Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

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
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

AlanPlantPot

[GLOBAL: userInfoPane.html]
AlanPlantPot
  • 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:

 

http://forums.coronalabs.com/topic/33636-my-android-app-needs-to-check-if-another-one-of-my-apps-is-installed-on-the-device-on-ios-i-use-url-schemes/

 

 

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).

 

Thanks



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,196 posts
  • Enterprise

[TOPIC: post.html]
#3

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.
else
   -- App is not installed.
end

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"]]) {
        
       //YES THIS APP IS INSTALLED :)
        
    }



[topic_controls]
[/topic_controls]