To give password to the apk

我的未来我决定 提交于 2019-12-25 03:00:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!