Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 49

kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
06/28/14 09:25 AM (10 years ago)

Linking to Google Play store from inside app

Hi all, I have learnt that if I want to use a link to Google Play inside my android app, I need to use market:// instead of http:// . So far so good. But apparently I need to also insert some code somewhere. It's supposed to look like this: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=PACKAGE_NAME")); startActivity(intent); Only I have no clue WHERE to put this! LOL Can anyone help a non-coder get his head round it? For context, I'm putting the link to my app into various html pages inside a free version of the same app.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/28/14 05:17 PM (10 years ago)
I have a free plugin on the market that does this: "launch play".adding support for it to have a gradient background in a couple of hours. Package name is "com.yourAppName". Your package name ahouldnt have cap letters like above.just did caps for readability.it shows an example in description of the plugin under json example.matter of fact if you go to google play on your computer and clixk on any app, the last part of the url will show you
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/28/14 05:38 PM (10 years ago)
https://www.buzztouch.com/plugins/plugin.php?pid=99B261F7A55FC225E4978FD it doesnt launch another app thats installed on your phone is what I meant in the description.Ill revise that as well later
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/28/14 09:33 PM (10 years ago)
here an example that shows you how to find it in eclipse : https://www.dropbox.com/s/46xxbsew88js5du/package%20name.PNG
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
06/29/14 12:46 AM (10 years ago)
CMCOFFEE to the rescue again! This looks just what I need. I'll try it out later on. Thanks very much.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/29/14 02:35 AM (10 years ago)
welcome,anytime
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
06/30/14 06:54 AM (10 years ago)
Any idea why I get this? https://www.dropbox.com/s/n37isimwoycqpnk/Screen%20Shot%202014-06-30%20at%2014.47.23.png "GradientDrawable cannot be resolved to a type"
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/30/14 08:20 AM (10 years ago)
Think import statement.thought i had put it in there.ill update when I get next to a computer.put your mouse over the underline red GradientDrawable.suggestions will show.click import...
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
06/30/14 08:48 AM (10 years ago)
Hi CMCOFFEE, thanks for the info. I've clicked on the import option and it now says that "GradientDrawable cannot be resolved to a variable" https://www.dropbox.com/s/jftrlc7uyhvqzsw/Screen%20Shot%202014-06-30%20at%2016.42.22.png
 
kingelessar
Lost but trying
Profile
Posts: 155
Reg: Mar 10, 2014
UK
6,500
like
06/30/14 08:58 AM (10 years ago)
Actually I think restarting eclipse has fixed it.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
06/30/14 09:54 AM (10 years ago)
nice ive updated it also
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.