Share Intents [Android and iOS]
We
need Share Intents to ease and expand what options are available for exporting data to other apps and services. One of the most popular features of games these days is this simple ability, where you can hit a button and either export a screenshot or share your high score via email or any social network app installed on the device. You can observe this functionality on
Stack, for instance. After completing a game, you hit the 'export' button at the bottom and can then export either a text message containing your score and a link to the app to any compatible external apps, or save/print a screenshot of your play.
iOS Sharing (via Extensions / UIActivityViewController)
Android Sharing (via Intents)
Note that this is NOT the same as integrating social network APIs directly into your app, which is a much more complex and error-prone process (AGK offers limited Twitter and Facebook support on that front). By using intents/extensions instead, we are provided with a
maintenance free, familiar and dynamic feature that evolves the share capabilities automatically based on what platform and apps the user has installed. From our own app, it is a matter of simply passing text/metadata or an image to it and let the external apps take care of the rest.
This capability has been available on Android forever, and the similarly behaving functionality via Extensions in iOS has existed since at least iOS 7 (of which at least 97% of iOS users have this version or later). From a technical perspective it is extremely easy to implement using just a few Java calls (Android) and Objective C calls (iOS). There is no worry of maintaining SDKs for all the different social platforms, no need to create new app entries and keys for the various social sites, or anything of that sort.
Here is
example code on how to share text and images via intents/extensions on Android and iOS. The code mentions Unity but the snippets are basically native Java and Objective C and could easily be worked into AGK's architecture.
Further reading here.
I hope you agree that this is a very worthwhile addition to AppGameKit and one that should not take a lot of time to implement. I would propose the following AppGameKit commands:
ShareTextWithIntents(strSubject, strMessage)
ShareImageWithIntents(intImgId, strMessage) [
or strImgPath, strMessage]