Good Day:
I have spent time trying to decode how to get my app to programmatically check if there is a newer version on the AppStore or PlayStore on launch. Now that MAF is out I am wondering it the framework provides a direct solution for this? Here's what my research has revealed thus far:
- the code will be called from the app's LifeCycleListener.Start() method which fires at launch
- I found these code solutions:
ANDROID OPTION:
String response = SendNetworkUpdateAppRequest(); // Your code to do the network request
// should send the current version to the server
if(response == "YES") // Start Intent to download the app user has to manually install it by clicking on the notification
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("URL TO LATEST APK")));
ANDROID OPTION:
intent.setDataAndType (Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/download/" + ApkName.toString())), "application/vnd.android.package-archive"); startActivity(intent);
Does MAF framework have a solution?