I want to use "sharing" component to share a "high score" of a game; by taking screen shot of the game screen (with its high score).
Then I can share it Instagram with game screen photo for instance.
How to take a screen shot of the game screen before sharing?
You have to either take a screenshot using your Android. Many Androids allow you to do this by pressing the Volume button and the OFF button on the device simultaneously. Find the instructions for your device and look for something like take a screenshot . How you do this on different phones/tablets is different and it may not be possible on some devices.
You can add code in you app to capture the highscore game screen IF the game screen (and score) is displayed within an AI2 Canvas control. It is possible to save a copy of what is currently in the Canvas. Once you save that image, use your Android's Gallery app to share it or you can do some more coding and possibly send it from your AI2 app using the Sharing component.
Here is Taifun's example of how to save a Canvas: http://puravidaapps.com/ snippets.php#2canvassave
Try some blocks. When you get a solution, why not post your blocks showing how YOU did it?
Actually first, I used "camera" component to share players' high score with their photo.
But instead of this, I want to take a photo of the game screen (see photo below), then use "sharing" component to share to Instagram.
댓글 없음:
댓글 쓰기