Hello,
I'm also just beginning with Android, every day we learn :).
So, about the intent.
If you're using a normal Activity (or a derivative thereof), starting a new
Intent to open a URL would look like the following:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse("thisismyurl.com"));
startActivity(i);
Now, if you replace the URL (thisismyurl.com) with the URL of your app on
the Play Store, Android will automatically detect that and prompt the user
to open the link using either one of the browsers, or the Play Store
application.
Hope this helped.
On Wednesday, May 23, 2012 6:56:01 PM UTC+2, Fran wrote:
>
> Hi,
>
> First, thanks by your fast answer.
>
> On the issue, I will try to be the less obstrusive as possible, showing
> the message just one time for the same user for the rest of his life,
> and only if the user has been playing the game for a long time, so he
> likes it. If it says "no", I will not ask again.
>
> On the code, could you develop a bit more this idea?
>
> "make it so that a new intent is passed with the URL for your app, using
> the ACTION_VIEW"
>
> It is my first app for Android, and also I have no write a line of Java
> code until this for more than 15 years...
>
> Thanks a lot in advance,
>
> On 23/05/12 18:42, Bas Verhoog wrote:
> > I don't really think you should force them into going to the Play Store,
> > but that's not your question.
> >
> > I would use public void onBackPressed (right mouse click -> Source ->
> > Implement/Override Methods), and make it so that a new intent is passed
> > with the URL for your app, using the ACTION_VIEW. This will also let the
> > user choose whether or not to view it in Google Play, then call
> `finish();`
> > at the end to be sure.
> >
> > On Wednesday, May 23, 2012 6:37:33 PM UTC+2, Fran wrote:
> >> Hi there,
> >>
> >> I rather like to encourage users to write reviews on my app. Is there
> >> any manner to open the Google Play app's page from within my code when
> >> the user is leaving the application?
> >>
> >> Thanks a lot in advance,
> >>
> >>
>
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en