How do I share scores by SMS/email/etc.? (Android)

Get help using Construct 2

Post » Sat Jun 07, 2014 8:09 am

Hi!

I'm gonna make a simple game on Android.

I'd like to include some virality features, like share by SMS/mail/twitter in Flappy Bird (screenshot taken on iPhone but know what I mean).

Image

Is there a way to call that kind of "native share functions" (?) in C2?

Thanks for you help!

Rag
B
17
S
4
G
4
Posts: 137
Reputation: 3,767

Post » Sat Jun 07, 2014 10:55 am

I have not seen this so far, but I would suggest you to try to link with some php code like the facebook share button. (there is a good tutorial on that). Basically, you call a php page using Webbrowser action and that php code, hosted everywhere, can call a sms gateway, email server, ...
hope it helps
B
7
Posts: 20
Reputation: 329

Post » Sat Jun 07, 2014 2:33 pm

Hi Ragtime,
I actually got "mailto:" working across all platforms.. you can see how in this thread: how-do-i-let-player-email-their-high-score-to-friends_t106355?start=10

To save you time, here's the important Info:

Update! This wasn't working on IOS devices, so I needed to encode the text for the subject and body AND IOS DEMANDS AN EMAIL ADDRESS!!!, like so:
mailto:[email protected]?subject=MYGAME%20score!&body=I%20just%20scored%20one%20POINT%20on%20MYGAME.%20Can%20you%20beat%20that%3F%20http%3A%2F%2Fwww.MYGAME.com

I solved the mailto issue on safari IOS!!!!!!! The trick is to make sure to use browser/go to URL and NOT browser/open in new window specifically for mailto....for opening facebook or twitter pre-populated posts, you want to use browser/open in new window.

cheers,
Mike
B
49
S
9
G
4
Posts: 426
Reputation: 7,071


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests