0

I am trying to update my application from a URL because i am distributing my application through a server and not posting the application in the android market . i am successful in updating the application. But i do not want the dialog that appears after the update is complete. the dialog that appears says "Application Installed" and it has two buttons 1) OPEN 2) DONE. I do not want the second button "DONE". i just want to display only one button i.e "OPEN". How do i go about doing this ?

vivek
  • 45
  • 10

1 Answers1

3

That is not possible.

This is the standard android procedure, you cannot change the way of installing an application and force the user to press Open. (The user can always press the Home or Back button)

----- Edit

You can start your application on the Package Installed Intent:

<receiver android:name=".IntentReceiver">
  <intent-filter>
    <action android:name="android.intent.action.PACKAGE_ADDED" />
    <action android:name="android.intent.action.PACKAGE_REPLACED"/>
    <action android:name="android.intent.action.PACKAGE_REMOVED" />
    <data android:scheme="package" />
  </intent-filter>
</receiver>

BroadcastReceiver:

public class IntentReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        // Do your stuff here.
    }
}
Ion Aalbers
  • 7,830
  • 3
  • 37
  • 50
  • i don't mind the DONE button there in the dialog but i want to open my application even if the user presses/clicks the DONE button. is there any way of achieving this – vivek May 09 '12 at 07:00
  • @vivek, are you sure the user wants to open your application after it was updated? Seeing how its their phone, you might want to consider letting them choose what happens on it. – Franci Penov May 09 '12 at 07:08
  • i am giving a way for them to exit from my application through logout button. when they already have agreed to update my application then why do u think it's not trustworthy to open the app after the update.. – vivek May 09 '12 at 07:23
  • @lon Aalbers, does the above code needs any permission to be added, because after i have updated the app i am not being notified – vivek May 09 '12 at 09:21
  • Oh, probably you replaced your application. You should add this line to the manifest: [I also edited my post] – Ion Aalbers May 09 '12 at 09:27