Stencyl 3.4.0 is now out. Get it now!

[iOS/Android] ReplayKit for iOS9 and Android 5.0 (0.0.7)

robinschaafsma

  • *
  • Posts: 638
ReplayKit for iOS9 and Android 5.0
Works on iOS9 and above and Android 5.0 and above

For Stencyl 3.4 and above

Stencyl extension for “ReplayKit” for iOS9 and Android 5.0 . This extension allows you to easily integrate ReplayKit on your Stencyl game / application. (http://www.stencyl.com)

ReplayKit is only available on the following devices running iOS 9 or above; iPad Air 2, iPad Mini 2, iPad Mini 3, iPad 5 Air, iPhone 5s, iPhone 6 and iPhone 6 Plus. 

On Android  is ReplayKit only available on devices running Android 5.0 (Lollipop) or above.
For Android make sure you selected API 21 or higher in Mobile settings->version->Android Target version


IMPORTANT
This Extension Required the Toolset Extension Manager http://byrobin.nl/store/product/byrobintoolsetextension/


How to download this extension
Go to: http://byrobin.nl/store/product/replaykit-for-ios9-stencylopenfl/
Add the extension to the cart en proceed with checkout. After you successfully placed the order, you will get an e-mail with the download link or go to “My Account” section where you can also find the download link.

Install the zip file: Go to : http://community.stencyl.com/index.php/topic,30432.0.html

Main Features
- Recording video and share

Version History
2016-04-06 (0.0.1) First release
2016-04-08 (0.0.2) Fix: Crash on iOS8 and lower.
2016-10-01 (0.0.3)
– Android 5.0> support (works only on device thats running Android 5 or higher
– Added is Cancelled boolean block
– Added ask for Preview option in Initialize block (ask user to view video after recording)
2016-10-03 (0.0.4) Update for iOS 10 startRecordingWithMicrophoneEnabled is Deprecated in iOS 10, need to call startRecordingWithHandler in iOS 10.
2017-03-19 (0.0.5) Added Gradle support for openfl4
2017-03-21 (0.0.6) Fix: Audio stops playing after dismiss Preview, Added previewController didOpened/didClosed boolean block. (for pause your gameaudio when preview didopened and resume when closed)
2017-05-16(0.0.7) Tested for Stencyl 3.5, Required byRobin Toolset Extension Manager

Documentation and Block Examples
For Android make sure you selected API 21 or higher in Mobile settings->version->Android Target version
1)Use the Initialize ReplayKit block in your first (loading)scene in "when created" Event.
Use this block only once a session. If you want to ask the user to view the video or discard the video select YES, else select NO. If No the video will been viewed automatically after stop recording.


2) EXAMPLE: Create an Actor "Start/Stop Record button"


3)EXAMPLE: In the Events tab of the Actor create an boolean Attribute and set this to true when Actor is created.


4)EXAMPLE: In the Events tab of the actor add an when the mouse is pressed on Self Event.
- Setup the Actor animation like example below.
- Put the Start Recording block between the if startRecording statement, when startRecording is true then set startRecording to false and switch to animation 1 (stop button) and Start Recoding.
- Put the Stop Recording in the otherwise block, set the startRecording to true again and switch back to animation 0 (start button) and Stop Recording.


5)EXAMPLE: Create an scene where you want to create the Actor (Start/Stop button). In the Events tab add an when created event.
- Put the replaykit available block in an if statement and put the create actor between it.
ReplayKit works only on iOS9 or above and Android 5.0 or above and because it is not available on all devices, you only want to show the Recording button on devices where the Replaykit is available.
If the ReplayKit is not available it will return false and the Actor will never be created.



6) Test it and play with it. You can share the video when you preview the video. Apple has set an standard share message that cannot be modified.
Standard message when you testing is:
[app store app name] from [developer]
http://www.apple.com

This message will be set to your game when you publish your game.

7)isRecoding block.
This boolean block turns true when recording start and turns to false when recording stops.

« Last Edit: May 16, 2017, 03:30:55 pm by robinschaafsma »
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



Bhoopalan

  • *
  • Posts: 955
What's replayKit? We can record videos in runtime and share the video outside of the app?? o_O If that's the case, it would be G-R-E-A-T!!!
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

robinschaafsma

  • *
  • Posts: 638
Yes you can record the screen at runtime. Just start recording when player starts playing, when gameover just stop recording an new window will open where the player can watch, edit and share the video.
See:
http://www.idownloadblog.com/2015/09/16/replaykit-hands-on/
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



Bhoopalan

  • *
  • Posts: 955
Wow!! That's AMAZING!! You're an asset to Stencyl, Robin. I feel so bad I'm unable to help you by donating. I wish the situation changes soon.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

thechaosengine

  • *
  • Posts: 307
Awesome, bought and trying it out now.

EDIT: Ok so it works perfectly and was no problem to set up whatsoever. Great work!!

« Last Edit: April 07, 2016, 03:57:58 am by thechaosengine »

riki82

  • *
  • Posts: 306
Robin! Awesome extension!!!

robinschaafsma

  • *
  • Posts: 638
Thanks enjoy if there are any issues just let me know..
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



Oh my! I will definitely be buying this!! :) AMAZING job!!

Edit: I have one problem with this though, is there any way you can make it work with other devices such as iPhone 4, iPod 4 and 5, iPhone 4s? I would need that workable for the extension before I could actually use it.

designpeg

  • *
  • Posts: 466
Amazing! Downloaded and works great. This is going to be SO useful for me. I build kids games, and this is a great way to analyse their interactions, as it can record their chatter while they play.

Thanks, great work and well worth the cost.


robinschaafsma

  • *
  • Posts: 638
Oh my! I will definitely be buying this!! :) AMAZING job!!

Edit: I have one problem with this though, is there any way you can make it work with other devices such as iPhone 4, iPod 4 and 5, iPhone 4s? I would need that workable for the extension before I could actually use it.

No it is only working on devices with A7/A8/A9 Chipsets, that is how Apple made the Replaykit SDK..
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl



Bhoopalan

  • *
  • Posts: 955
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

thechaosengine

  • *
  • Posts: 307
https://www.youtube.com/watch?v=1W_lYe2ny9A

Easily got it all working :)

What's the game? Is it something you're working on?

Yeah, it's called Magic Mansion, it's p brutal. Coming out soon!

suitcasenuke

  • *
  • Posts: 95
This is a fantastic extension! I works perfectly. One thing though, it seems to crash the app on start up when using a device that uses iOS7. I've got the replaykit available bool on all the buttons that need it as well. Any ideas?

robinschaafsma

  • *
  • Posts: 638
Ok thanks for mention this. I was only focus on iOS9 so i forgot to Weak Linking the ReplayKit Framework.

I have update this Extension to 0.0.2 to fix this issue.
You can login in to your account and download the Extension again under My Account

I have Weak Linking the ReplayKit Framework, this means the Framework is optional. To make it optional, devices on iOS8 or lower will not crash anymore.

Let me know if this works for you...
byRobinGames.com


I'am not always on the forum, you can mail me if you have an question. info@byrobin.nl