Notify user within app that a new version is available

前端 未结 8 1815
無奈伤痛
無奈伤痛 2020-12-17 18:54

I have an android app in the market and I\'ve noticed that it can take quite a while for the app to be updated when I release a new version.

What I was hoping is so

相关标签:
8条回答
  • 2020-12-17 19:47

    Google has just made this a whole lot easier. See https://developer.android.com/guide/app-bundle/in-app-updates

    0 讨论(0)
  • 2020-12-17 19:48

    How to check there is new version of app is available on playstore, notify users to update old apps with new version in android and display yes or no to get them playstore. Just follow the instructions and put the attached code in your app to check the new version of app is available or not. This code check the app version each day if there is any new version update is available on playstore the a popup will appear on app launch for update.

    if (newVersion > curVersion) {
                        /* Post a Handler for the UI to pick up and open the Dialog */
                        mHandler.post(showUpdate);
                    } 
       private Runnable showUpdate = new Runnable(){
               public void run(){
                new AlertDialog.Builder(MainActivity.this)
                .setIcon(R.drawable.ic_launcher)
                .setTitle("Update available")
                .setMessage("An update for Live Share Tips is available on Play Store.")
                .setNegativeButton("Update now", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                                /* User clicked OK so do some stuff */
                            easyTracker.send(MapBuilder.createEvent("App update",
                                    "Update now", " ", null).build());
                                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=com.appuonline.livesharetips"));
                                startActivity(intent);
                        }
                })
                .setPositiveButton("Later", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int whichButton) {
                                /* User clicked Cancel */
                            easyTracker.send(MapBuilder.createEvent("Update_Later",
                                    "Update later", " ", null).build());
                        }
                })
                .show();
               }
        }; 
    

    to download full code[url]:http://androidaone.com/11-2014/notify-users-update-app-new-version-available-playstore/

    0 讨论(0)
提交回复
热议问题