Is it possible to implement the following applications?
The bottom line is the app for using the web app in Chrome.
android google-chrome
I don't have an Android machine at hand, so I haven't verified it yet, but I think the processing can be branched with or without Chrome using the following code.
Wouldn't it be difficult to say that if a particular domain number 4 had already been opened?
String urlString="http://www.google.com";
Intent = new Intent(Intent.ACTION_VIEW, Uri.parse(urlString)));
int.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
int.setPackage("com.android.chrome");
try{
// Open in Chrome if Chrome is installed
startActivity (intent);
} catch(ActivityNotFoundExceptionex){
// Download if Chrome is not found
startActivity(newIntent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=com.android.chrome"));
}
© 2024 OneMinuteCode. All rights reserved.