问题
I have developed one application and made the apk of that app.Now I want to give password to that so that when anyone will try to install the application it will ask for the password.
回答1:
You can't protect apk files that way, however you can add a screen to your application that "validates" the install, this is where they should enter a password which should be entered just once and remember this.
回答2:
You cannot simply do this. Are you trying to licence your software? If so, create a Splash Screen with some login credentials or an EditText
field where the user types in a licence key. Make sure that the splash screen has the right Intent Filter
, as well:
<activity
android:name=".Splash"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
来源:https://stackoverflow.com/questions/12577058/to-give-password-to-the-apk