Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

How do we check if another app is installed on the device, and launch it?
Started by AlanPlantPot Jun 28 2013 02:44 AM

- - - - -
2 replies to this topic
android ios openurl
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 733 posts
  • Corona SDK

I know it's something really simple, and I'm sure I've seen it here before but I can only find this at the moment:





This allows you to check if another app is present on Android devices, how would we do the same thing on iOS?


And once we know the app is there, how do we launch those apps? I'm guessing it's something to do with openurl and url schemes, but I'm not sure. I'm hoping I don't have to hardcode the names of other apps.


I want to be able to show a list of sister-apps to the user, which I would keep up-to-date on our servers. If the user already has one of the apps then I want them to show a play button which will switch to that app, otherwise I will show an install button with a link to the store (the link will be handled by the server too).



[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,196 posts
  • Enterprise

[TOPIC: post.html]

Trung Kien Tran

[GLOBAL: userInfoPane.html]
Trung Kien Tran
  • Enthusiast

  • 61 posts
  • Corona SDK

With Android, check app installed by code:

local appIcon = display.newImage("android.app.icon://my.package.name")
if appIcon then
   -- App is installed.
   -- App is not installed.

With Windows Phone, https://msdn.microsoft.com/en-us/library/windows/apps/windows.phone.management.deployment.installationmanager.findpackagesforcurrentpublisher.aspx



How to check app installed with iOS (not open app)?

Please help me!


On C:

 if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"myapp1234567://whateveryouwant"]]) {