Opening up the App store from within an app (IE buy full game in demo)

Ummm how?
I tried using native.showWebPopup() but it does just that, shows a web page controlled bymy game.
What I want is something identical to the free walkabout trial - in that when you click on the buy game button it opens up the app store app directly.

Any ideas on how to do this?
I tried scouring the API and doc pages but came up with nothing appropriate :frowning:

Barry [import]uid: 46639 topic_id: 18793 reply_id: 318793[/import]

Hey there,

It took me a little but I’ve found a solution :slight_smile:

[lua]local function openIt()
system.openURL(“http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=479147093&mt=8”)
end[/lua]

All you have to do there is change the id=479147093 to your own app ID and it will open.

Peach :slight_smile: [import]uid: 52491 topic_id: 18793 reply_id: 72342[/import]

Sorry for injecting my question here. I asked before, and never really got an answer… I am trying to open a developer page from a link, and keep getting errors on that.

the below sample link just doesn’t work
[lua]system.openURL(“http://itunes.apple.com/us/app/xxx/id396468430?mt=8”)[/lua]

Any idea how to place a link in the app that would link to the developer “page” that shows all apps?

Thanks
[import]uid: 10379 topic_id: 18793 reply_id: 72358[/import]

Hi,
Create a pop up page and display all your link on this page
and after selecting one of the link close your pop up page.

[import]uid: 75428 topic_id: 18793 reply_id: 72370[/import]

Yes I know I can create a page use director or similar to go to a “page” with individual links… but I’ve seen/played some games out there that link to the developers page directly with a caption similar to “More Games” or whatever… it would be extremely useful if something like that could be achieved in corona. [import]uid: 10379 topic_id: 18793 reply_id: 72371[/import]

This does a redirect via Safari but will work;

[lua]system.openURL(“http://itunes.com/apps/yourname”)[/lua]

Peach :slight_smile: [import]uid: 52491 topic_id: 18793 reply_id: 72372[/import]

Use this link. I hope this will work.Only you have to there change id to your own id.
native.showWebPopup(“http://itunes.apple.com/us/app/abc/id”) [import]uid: 75428 topic_id: 18793 reply_id: 72376[/import]

Sabir that goes through Safari for a single app, the first way is best as it goes straight to the store and doesn’t open Safari.

Peach :slight_smile: [import]uid: 52491 topic_id: 18793 reply_id: 72382[/import]

Peach, as always… you’re the best! [import]uid: 10379 topic_id: 18793 reply_id: 72505[/import]

Thanks - I try :slight_smile: [import]uid: 52491 topic_id: 18793 reply_id: 72589[/import]

Thank you very much Peach, your code did indeed work - so that was very much appreciated :slight_smile:

I am kicking myself for not managing to find the function myself, but then, I spent time looking in the network help instead :wink:

It is nice to be part of a community where the staff actually respond and help in a timely fashion! [import]uid: 46639 topic_id: 18793 reply_id: 72717[/import]

Hey Rakoonic,

Don’t worry about not being able to find the function yourself; it isn’t well documented :wink:

Thanks for the kind words too, I love making sure users can get help and I know the rest of the team do as well.

Peach :slight_smile:
[import]uid: 52491 topic_id: 18793 reply_id: 72852[/import]

This works for me, just replace 600018347 with your app id and soccermazs2-ipad to your app name:

local function soccermazes(event)
if event.phase == “release” then
audio.play( tapSound )
if event.id==1 then
showRanksUrl2=“https://itunes.apple.com/us/app/soccermazes2-ipad/id600018347?ls=1&mt=8
elseif event.id==2 then
showRanksUrl2=“https://itunes.apple.com/us/app/soccermazes2/id600301044?ls=1&mt=8
end
native.showWebPopup(showRanksUrl2)
end
end

smButton = ui.newButton{
defaultSrc = “appleicon.png”,
defaultX = 150,
defaultY =52,
overSrc = “appleicon.png”,
overX =150,
overY = 52,
onEvent = soccermazes,
id = 1,
text = “”,
font = “Helvetica”,
textColor = { 255, 255, 255,255 },
size = 24,
emboss = false
}

smButton.x = 245
smButton.y = 50
smButton.xScale = 0.8
smButton.yScale = 0.8
hudGroup:insert( smButton )
[import]uid: 34373 topic_id: 18793 reply_id: 142256[/import]

This works for me, just replace 600018347 with your app id and soccermazs2-ipad to your app name:

local function soccermazes(event)
if event.phase == “release” then
audio.play( tapSound )
if event.id==1 then
showRanksUrl2=“https://itunes.apple.com/us/app/soccermazes2-ipad/id600018347?ls=1&mt=8
elseif event.id==2 then
showRanksUrl2=“https://itunes.apple.com/us/app/soccermazes2/id600301044?ls=1&mt=8
end
native.showWebPopup(showRanksUrl2)
end
end

smButton = ui.newButton{
defaultSrc = “appleicon.png”,
defaultX = 150,
defaultY =52,
overSrc = “appleicon.png”,
overX =150,
overY = 52,
onEvent = soccermazes,
id = 1,
text = “”,
font = “Helvetica”,
textColor = { 255, 255, 255,255 },
size = 24,
emboss = false
}

smButton.x = 245
smButton.y = 50
smButton.xScale = 0.8
smButton.yScale = 0.8
hudGroup:insert( smButton )
[import]uid: 34373 topic_id: 18793 reply_id: 142256[/import]