I am developing an android app. i want to implement rate functionality in android market? There is button in app exit. I want that when i click exit an pop up should open which redirect on android market rating page. if rated already it should not redirect on android market and show you have rated alreay message. how can i achieve this.api returns anything after adding rating.
To redirect to your app you can use:
Uri marketUri = Uri.parse("market://details?id=" + packageName);
Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
startActivity(marketIntent);
Also, to check if already rated or not, save a boolean in SharedPreferences and check it.
Rating an android app within an application
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.test(package name)"));
startActivity(intent);
Related
My application needs QR code scanner app for running properly. There is no problem to request it like:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData( Uri.parse( "market://details?id=something" ));
startActivity(intent);
After this I am redirected to Google market with predefined application. However my problem is that this code exits my main application. It is not in list. Is this a correct behaviour? When you want to install some other application does it exit other applications? Or am I doing something wrong?
Main goal is to just bring to front my main application to use it after QR code scanner is installed.
Any help is appreciated.
Have you write finish() in your previous activity from where you are redirecting to google play activity. If you have written then remove it.
final String APPLICATION_PACKAGE_ID = "com.google.zxing.client.android";
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + APPLICATION_PACKAGE_ID)));
} catch(ActivityNotFoundException anfe) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + APPLICATION_PACKAGE_ID)));
}
So I just make like it is. And when the application is installed I just hit back and it works. I dont understand how didn't work this in friday but now it is ok.
I have an Android application. I can add posts to timeline using it. Every such post is signed with message "via ЖАЛОБАнк" below. When I click to this link, open page for this app.
How make opening Google Play or other page in browser for installation this app?
You can start an intent to open a link when the user clicks on it. For instance, you can do this onClick()
Intent fb = new Intent(Intent.ACTION_VIEW);
fb.setData(Uri.parse("http://facebook.com"));
startActivity(fb);
I didn't try but this should work:
Intent intent = new Intent("android.intent.action.VIEW", Uri
.parse("https://play.google.com/store/apps/details?id=com.facebook.katana"));
startActivity(intent);
I am starting market intent to go my app. It starts well and also showing my app. But problem with this is when pressing back, it is not coming to my my app again. Also when pressing home in market, again launch app, it shows market page instead of app.
Here is the code which i am using.
Intent marketIntent = new Intent(Intent.ACTION_VIEW);
marketIntent.setData(Uri.parse("market://details?id=" + AndroidUtils.getPackageName()));
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(marketIntent);
Thanks in advance!
use
Intent marketIntent = new Intent(Intent.ACTION_VIEW);
marketIntent.setData(Uri.parse("market://details?id=" + AndroidUtils.getPackageName()));
startActivity(marketIntent);
don't use the flags because the activities are cleared when u use these flags
Like the title says. Is there an intent to launch android market to the "My Apps" page?
I have a dialog that displays if the app is out of date. I'd like to put a button on the dialog that leads directly to the "My Apps" page so the user can download the update.
Edit: For clarity, I'm not talking about the details page for my app. I'm talking about the "My Apps" section of the Android Market application.
See this: http://developer.android.com/guide/publishing/publishing.html#marketintent for everything you want to know.
EDIT: try this. Do note that this might change if the Market app is updated to use a different activity.
Intent i = new Intent("android.intent.action.VIEW");
i.setComponent(new ComponentName("com.android.vending","com.android.vending.MyDownloadsActivity"));
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
This solution has been working for me flawlessly across many Gplay versions so far. Here's a summary:
Intent intent = new Intent("com.google.android.finsky.VIEW_MY_DOWNLOADS");
intent.setClassName("com.android.vending", "com.google.android.finsky.activities.MainActivity");
startActivity(intent);
The latest version of Play Store app is fragment based. You cannot open the "My Apps" because it's hosted in the same activity as the rest of fragments. The best you can do is to open the main activity and let user navigate to the "My Apps".
Intent marketIntent = new Intent(Intent.ACTION_VIEW)
.setComponent(new ComponentName("com.android.vending",
"com.google.android.finsky.activities.MainActivity"))
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(marketIntent);
I want to direct the user from one app the user is currently running, to the market, to download another app.
The link to the market is: market://search?q=pname:your.package.name
use this in your code:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=com.android.example"));
startActivity(intent);
from: http://developer.android.com/guide/publishing/publishing.html#marketintent
Yes. Try this:
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("https://market.android.com/details?id=com.hg.cyberlords"));
c.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
c.startActivity(intent);
This will open the market app with "Cyberlords" app.