Android Share function?

Get help using Construct 2

Post » Fri Oct 18, 2013 4:49 am

Is there any way to call Android's native SHARE function? It would be great to be able to specify a text blurb and have the OS display apps that it can be shared with.
B
19
S
6
G
2
Posts: 57
Reputation: 2,524

Post » Thu Dec 12, 2013 5:24 pm

@funkyos did you ever find anything out about this? I would love to know as well
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Thu Dec 12, 2013 10:30 pm

@russpuppy never got the native share functionality but I did get a decent workaround. I'm launching a specific URL from the browser object and Android is smart enough to know which apps can be loaded with the provided URL. So far I have email, sms and twitter.

Here's a capx that shows how I did it. https://dl.dropboxusercontent.com/u/38658788/sharing.capx
B
19
S
6
G
2
Posts: 57
Reputation: 2,524

Post » Fri Dec 13, 2013 2:46 pm

[QUOTE=funkyos] @russpuppy never got the native share functionality but I did get a decent workaround. I'm launching a specific URL from the browser object and Android is smart enough to know which apps can be loaded with the provided URL. So far I have email, sms and twitter.

Here's a capx that shows how I did it. https://dl.dropboxusercontent.com/u/38658788/sharing.capx[/QUOTE]

@funkyos, thanks this is a great workaround.

You could also do Facebook with the sharer.php link.

example: https://www.facebook.com/sharer/sharer.php?s=100&p[url]=google.com&p[images][0]=https://www.google.com/images/srpr/logo11w.png&p[title]=Google%20is%20fun&p[summary]=Yay%20this%20is%20a%20google%20link

Here's a good website for building links with URL parameters: http://www.sharelinkgenerator.com/
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Fri Dec 13, 2013 8:39 pm

@russpuppy Thanks for the Facebook URL. I'm going to implement that as well :)
B
19
S
6
G
2
Posts: 57
Reputation: 2,524

Post » Fri Mar 07, 2014 9:31 pm

Very good this tip, hope it works in APK compiled by cocoonjs, and also hope that Scirra can solve this problem soon plugin facebook for android because it is super bad and do run on facebook all cute and time to export pro cocoonjs and generates and sends pro apk mobile does not work anything, so ta very annoying me, I think the staff Scirra have to test these plugins before releasing them, because it is not good to do all the work and this work on mobile
B
4
S
2
G
2
Posts: 3
Reputation: 1,500


Return to How do I....?

Who is online

Users browsing this forum: lahbach and 25 guests