Code Monkey home page Code Monkey logo

frisp-social-unity-asset's Introduction

Frisp Social Unity Asset

Unity asset that provides the ability to share the current screen on various social media platforms that your device supports natively.

Games using this asset

Bouncy Bones

A spooky circus themed 2D side-scroller which will have you challenged and itching to play more.
Available on:

Development

I have set the repository up as a unity project. When adding features you will need to open the contents of the repository in unity. For any new features add a new UI Button and connect the feature up to that button and name it accordingly.

If you would like to make any changes or update the android layer of the asset you can do so by changing the contents of the android-social-library. You will then need to replace frisp-social.jar inside of this repo with the one generated from working on android-social-library.

Installing into your own project

  • Download the asset and import it into your unity project.
  • Create a class that takes a screenshot of the game and then use the API provided with the asset to share it. See the below class as an example:
using UnityEngine;
using System.Collections;

public class Share : MonoBehaviour {
  private const string TITLE   = "Title";
  private const string MESSAGE = "Message";

  public void shareScreenShot() {
    StartCoroutine (FrispGames.Social.ScreenshotSharer.Instance().PostScreenshot(TITLE, MESSAGE));
  }
}

Troubleshooting

Android:

  • INSTALL_FAILED_CONTAINER_ERROR: When exporting the project to Android Studio change: android:installLocation="preferExternal" to: android:installLocation="auto" on the following line:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.frispgames.frispsocialunityasset" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
  • Permission issues: Make sure the following line is in your AndroidManifest.xml this should be under Plugins/Android folder. If not you can find one under the Temp/StagingArea directory after building for android. Add this into your Plugins/Android directory and add the below line:
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

frisp-social-unity-asset's People

Contributors

treacher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

frisp-social-unity-asset's Issues

Don't work on iOS9

I'm trying to run demo scene on iPad with iOS 9.3 and get next error. Can you suggest me solution?
Unity 5.2.2, xCode 7.3 (7D175)
LOG:
about to send file over playerconnection /var/mobile/Containers/Data/Application/5AFC4CEA-345C-4C24-97E7-EBB1C77236D6/Documents/73637265656e73686f742e706e67 with length 144076
2016-05-23 11:44:47.084 test[15116:3455676] Uncaught exception: NSGenericException: UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x199b9070>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.
(
0 CoreFoundation 0x24f4b9a3 + 150
1 libobjc.A.dylib 0x246e6e17 objc_exception_throw + 38
2 UIKit 0x29da84bd + 3340
3 UIKit 0x29808d33 + 1798
4 UIKit 0x29806c53 + 382
5 UIKit 0x29760369 + 268
6 UIKit 0x2976c67b + 90
7 UIKit 0x294aaa4d + 84
8 CoreFoundation 0x24f0d739 + 20
9 CoreFoundation 0x24f0ba3d + 280
10 CoreFoundation 0x24f0be6f + 958
11 CoreFoundation 0x24e5b2e9 CFRunLoopRunSpecific + 520
12 CoreFoundation 0x24e5b0d5 CFRunLoopRunInMode + 108
13 GraphicsServices 0x2644bac9 GSEventRunModal + 160
14 UIKit 0x295200b9 UIApplicationMain + 144
15 test 0x00022284 main + 244
16 libdyld.dylib 0x24b03873 + 2
)
2016-05-23 11:44:47.085 test[15116:3455676] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<_UIAlertControllerActionSheetRegularPresentationController: 0x199b9070>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'
*** First throw call stack:
(0x24f4b98b 0x246e6e17 0x29da84bd 0x29808d33 0x29806c53 0x29760369 0x2976c67b 0x294aaa4d 0x24f0d739 0x24f0ba3d 0x24f0be6f 0x24e5b2e9 0x24e5b0d5 0x2644bac9 0x295200b9 0x22284 0x24b03873)
libc++abi.dylib: terminating with uncaught exception of type NSException

No static method with name='shareImage'

AndroidJavaException: java.lang.NoSuchMethodError: no static method with name='shareImage' signature='([Ljava/lang/String;)V' in class Lcom.frispgames.frispsocial.FrispSocial;

Facing this error however I check jar file location and Manifest permission in android phone as well as on Manifest file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.