Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

You are setting it up almost correctly, but you should also set the data type:

i.setType("application/vnd.android.package-archive") 

Additionally, do not call finish() after startActivity(). It is not necessary and might cause issues with the new Intent.

Your signature conflict is another problem. See this answerthis answer. The APK you are trying to install is signed with a different key that the currently installed one.

Finally, there is no way to install an APK without the user's explicit interaction (unless you have root, of course). This is intention for security reasons.

You are setting it up almost correctly, but you should also set the data type:

i.setType("application/vnd.android.package-archive") 

Additionally, do not call finish() after startActivity(). It is not necessary and might cause issues with the new Intent.

Your signature conflict is another problem. See this answer. The APK you are trying to install is signed with a different key that the currently installed one.

Finally, there is no way to install an APK without the user's explicit interaction (unless you have root, of course). This is intention for security reasons.

You are setting it up almost correctly, but you should also set the data type:

i.setType("application/vnd.android.package-archive") 

Additionally, do not call finish() after startActivity(). It is not necessary and might cause issues with the new Intent.

Your signature conflict is another problem. See this answer. The APK you are trying to install is signed with a different key that the currently installed one.

Finally, there is no way to install an APK without the user's explicit interaction (unless you have root, of course). This is intention for security reasons.

Source Link
Jeffrey Mixon
  • 13.7k
  • 4
  • 36
  • 58

You are setting it up almost correctly, but you should also set the data type:

i.setType("application/vnd.android.package-archive") 

Additionally, do not call finish() after startActivity(). It is not necessary and might cause issues with the new Intent.

Your signature conflict is another problem. See this answer. The APK you are trying to install is signed with a different key that the currently installed one.

Finally, there is no way to install an APK without the user's explicit interaction (unless you have root, of course). This is intention for security reasons.