軟鍵。下面是我的原因,不能夠使用任何: - 我的應用程序將被安裝在200個多片,所以它會殺了我,如果我想下載應用程序(如Hide Bottom Bar
或full!screen
)鎖定我的應用程序並安裝它每一個平板電腦。代碼通常用於以前版本的android(3),但我使用JellyBean 4.2隱藏的導航(系統)我已經嘗試了很多不同的方式去做吧
儘管事實上我在我的活動中使用了許多編程代碼(並且它們都沒有工作),但我也有在我的清單文件中嘗試了很多不同的代碼。
所有我需要做的是禁用的導航欄上的軟鍵,我甚至不希望隱藏導航欄(但如果你能提出一個方法,爲什麼不呢?)
下面是我的在我的清單文件的代碼只是爲了告訴我有多少種不同的代碼都試過,仍然停留在這件事情:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.androiddbconnection"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.androiddbconnection.JSONUseActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:stateNotNeeded="true"
>
<intent-filter>
<action android:name="android.settings.SETTINGS" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Webview"
android:theme="@android:style/Theme.NoTitleBar"
android:label="@string/app_name" >
</activity>
</application>
什麼建議嗎? 我也曾經面臨這樣的: You need to write your own home screen app which will implement the lockscreen behaviour that you require. There is sample code for writing your own home screen app in the Android SDK(Source code).
如果你認爲這是一個很好的方式,然後告訴我該怎麼辦呢?
P.S.,我知道在這個版本Android的它被認爲是一個安全問題,所以請給我的東西我真的可以使用。提前致謝。
你能告訴我怎麼用它嗎?因爲我嘗試使用它,我得到這個錯誤:語法錯誤令牌「DISABLE_MASK」,VariableDeclaratorId預計此令牌後,也是statuesBarManager無法識別。 我的意思是我應該在我的onContent()中使用它或什麼? – Sean
你忽略了提到'android.permission.STATUS_BAR'不適用於第三方應用程序。 –
哦,我很遺憾,我忘了這個代碼是從我自己的固件,你需要系統pid來做到這一點。 – Robin