How do I detected and run installed games on mobile

Get help using Construct 2

Post » Tue Jul 29, 2014 12:40 pm

Is there a way to detect if specific games was installed on mobile device and how can I run one game from another game?

Something like game repository, where you can click on image and if game "aaa" is installed on my device then start "aaa" game. If I click on game "bbb" start game "bbb" etc.


edit:
Found this http://developer.android.com/training/basics/intents/sending.html but have no idea how to use it in C2 :/
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Wed Jul 30, 2014 7:24 pm

oh come on, there must be someone with the answer :D
( nope, this is not bumping, not at all....)
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Sat Aug 02, 2014 6:15 pm

Found this:

For Android:
PackageManager pm = context.getPackageManager();
Intent appStartIntent = pm.getLaunchIntentForPackage(appPackageName);
if (null != appStartIntent)
{
context.startActivity(appStartIntent);
}


For ios:
BOOL isAppInstalled=[[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"APP-URL-Scheme"]];
if (isAppInstalled) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"APP-URL-Scheme"]]; // app launching code
}else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"Copied iTunes Store URL"]]; //go to store
}


but again, how do I make it work with C2?
Last edited by shinkan on Tue Aug 05, 2014 10:41 am, edited 1 time in total.
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Sun Aug 03, 2014 7:46 am

I would imagine a custom plugin, or you need to edit c2 source.
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Aug 05, 2014 9:45 am

Hey @rexrainbow You have made quite a lot good plugins for C2, maybe you could find some free time and look int this problem :)
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Tue Aug 05, 2014 9:56 am

@shinkan

I have no idea, sorry.
I did not make any platform-specific plugin.
B
108
S
26
G
272
Posts: 4,471
Reputation: 152,277


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 54 guests