Reputation: 35
I am trying in App inventor WebView to open an app link in the app store. The html link open the mobile version of playstore website, but this is not what i need.I need the link open the app in the Google Play Store app.
This html page is embedded in the WebView. Then the example with whatsapp App
<a href="https://play.google.com/store/apps/details?id=com.whatsapp">Buy it now</a>
I tried also market://
but it does not work.
Upvotes: 0
Views: 773
Reputation: 6293
Use the WebViewString property of the webviewer component to pass the URL back to App Inventor. Then use the Activity Starter to open the app in Google Play.
How does the property Webviewer.WebViewString work?
How to launch Google Play from within your app
Upvotes: 1
Reputation: 1285
If you want to link to your products from an Android app, create an Intent that opens a URL. As you configure this intent, pass "com.android.vending" into Intent.setPackage() so that users see your app's details in the Google Play Store app instead of a chooser.
The following example directs users to viewing the app containing the package name com.example.android in Google Play:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(
"https://play.google.com/store/apps/details?id=com.example.android"));
intent.setPackage("com.android.vending");
startActivity(intent);
It's for native android deleopment. You can do similar way like this:
Action:android.intent.action.VIEW
DataUri:https://play.google.com/store/apps/details?id=com.example.android
ActivityPackage:com.android.vending
Upvotes: 0