Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Integrating a number of Android SDKs (JAR) to Unity Android

Discussion in 'Android' started by taar1, May 31, 2012.

  1. taar1

    taar1

    Joined:
    Jan 12, 2012
    Posts:
    26
    Hey all,

    I'm trying to integrate a few Android SDKs to Unity Android for days now but have no luck getting this to work. I really could use some hints what I'm doing wrong in the process.

    The SDKs I want to integrate are (some more likely to come at a later point):
    - Google Analytics (libGoogleAnalytics.jar)
    - Smaad SDK (MoreApps.jar)
    - Zucks SDK (Fluct SDK) (ZucksAdnetSDK.jar)

    So I did the following:

    1. Created an Android project "DrTeethAndroidPlugins" with Eclipse. Namespace jp.paperbooya.drteeth which is the same namespace as in the Unity Android game in the player settings.
    2. Copied all the required JAR files into the /libs folder of the Android project in Eclipse. I also added the Unity Android JAR (classes.jar) to the Eclipse project.
    3. Created some regular Android activities implementing the ads from the used JAR files. Testing works fine, all the Ads are being displayed in the Android app properly.
    4. Made copies of all these activities and altered them to extend UnityPlayerActivity instead of Activity. The changed activities look like this for example:
      Code (csharp):
      1.  
      2. package jp.paperbooya.drteeth;
      3.  
      4. import jp.gmotech.MoreApps.MoreAppsActivity;
      5. import android.content.Intent;
      6. import android.os.Bundle;
      7.  
      8. import com.unity3d.player.UnityPlayerActivity;
      9.  
      10. public class SmaadUnityActivity extends UnityPlayerActivity {
      11.  
      12.     public static String blabla = "BLABLABLA";
      13.  
      14.     @Override
      15.     public void onCreate(Bundle savedInstanceState) {
      16.         super.onCreate(savedInstanceState);
      17.     }
      18.  
      19.     public void showSmaadMoreGames() {
      20.         Intent i = new Intent(getApplication(), MoreAppsActivity.class);
      21.         i.putExtra("MoreAppsZoneId", "111111111");
      22.         startActivity(i);
      23.     }
      24.  
      25.     public static String saySmaadStatic() {
      26.         return "Smaad Static";
      27.     }
      28.  
      29.     public String saySmaad() {
      30.         return "Smaad";
      31.     }
      32.  
      33.     public int sayFive() {
      34.         return 5;
      35.     }
      36.  
      37.     public static int saySixStatic() {
      38.         return 6;
      39.     }
      40.  
      41. }
      42.  
    5. Updated the project's manifest file in Eclipse:
      Code (csharp):
      1.  
      2. <?xml version="1.0" encoding="utf-8"?>
      3. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
      4.     package="jp.paperbooya.drteeth"
      5.     android:versionCode="1"
      6.     android:versionName="1.0" >
      7.  
      8.     <uses-sdk android:minSdkVersion="7" />
      9.  
      10.     <uses-permission android:name="android.permission.INTERNET" />
      11.     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
      12.     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
      13.  
      14.     <application
      15.         android:icon="@drawable/ic_launcher"
      16.         android:label="@string/app_name" >
      17.         <meta-data android:name="MEDIA_ID" android:value="0000000111"  />
      18.         <activity
      19.             android:name="jp.paperbooya.drteeth.DrTeethActivity"
      20.             android:label="@string/app_name" >
      21.             <intent-filter>
      22.                 <action android:name="android.intent.action.MAIN" />
      23.  
      24.                 <category android:name="android.intent.category.LAUNCHER" />
      25.             </intent-filter>
      26.         </activity>
      27.         <activity
      28.             android:name="jp.gmotech.MoreApps.MoreAppsActivity"
      29.             android:configChanges="orientation"
      30.             android:theme="@android:style/Theme.NoTitleBar" >
      31.             <intent-filter>
      32.                 <action android:name="android.intent.action.VIEW" />
      33.                 <category android:name="android.intent.category.DEFAULT" />
      34.                 <category android:name="android.intent.category.BROWSABLE" />
      35.             </intent-filter>
      36.         </activity>
      37.        
      38.         <!-- UNITY ACTIVITIES -->
      39.         <activity android:name="jp.paperbooya.drteeth.GoogleAnalyticsUnityActivity" android:screenOrientation="portrait" ></activity>
      40.         <activity android:name="jp.paperbooya.drteeth.SmaadUnityActivity" android:screenOrientation="portrait" ></activity>
      41.         <activity android:name="jp.paperbooya.drteeth.ZucksUnityActivity" android:screenOrientation="portrait" ></activity>
      42.  
      43.         <!-- Used for install referrer tracking -->
      44.         <receiver
      45.             android:name="com.google.android.apps.analytics.AnalyticsReceiver"
      46.             android:exported="true" >
      47.             <intent-filter>
      48.                 <action android:name="com.android.vending.INSTALL_REFERRER" />
      49.             </intent-filter>
      50.         </receiver>
      51.  
      52.         <service android:name="jp.gmotech.MoreApps.MoreAppsIntentService" />
      53.     </application>
      54.  
      55. </manifest>
      56.  
    6. Exported the project to a JAR file with Eclipse. Right mouse click on the project -> export -> JAR File -> to MyAndroidPlugins.jar
    7. Copied the JAR to the Unity Android project to /Plugins/Android/MyAndroidPlugins.jar
    8. Copied all the *.java files from the Eclipse project with the same structure to the Unity Android project
      Code (csharp):
      1.  
      2. Plugins\Android\src\jp\paperbooya\drteeth\DrTeethActivity.java
      3. Plugins\Android\src\jp\paperbooya\drteeth\SmaadUnityActivity.java
      4. Plugins\Android\src\jp\paperbooya\drteeth\ZucksUnityActivity.java
      5. Plugins\Android\src\jp\paperbooya\drteeth\GoogleAnalyticsUnityActivity.java
      6.  
      Because my first attempts didn't work I also copied the *.class files to the Unity Android project. Not sure if that step is required, though.
      Code (csharp):
      1.  
      2. Plugins\Android\bin\classes\jp\paperbooya\drteeth\DrTeethActivity.class
      3. Plugins\Android\bin\classes\jp\paperbooya\drteeth\SmaadUnityActivity.class
      4. Plugins\Android\bin\classes\jp\paperbooya\drteeth\ZucksUnityActivity.class
      5. Plugins\Android\bin\classes\jp\paperbooya\drteeth\GoogleAnalyticsUnityActivity.class
      6.  
    9. Updated the AndroidManifest.xml file in the Unity Android project located in /Assets/Plugins/Android/AndroidManifest.xml
      Code (csharp):
      1.  
      2. <?xml version="1.0" encoding="utf-8"?>
      3. <manifest
      4.     xmlns:android="http://schemas.android.com/apk/res/android"
      5.     package="jp.paperbooya.drteeth"
      6.     android:installLocation="preferExternal"
      7.     android:versionCode="1"
      8.     android:versionName="1.0">
      9.     <supports-screens
      10.         android:smallScreens="true"
      11.         android:normalScreens="true"
      12.         android:largeScreens="true"
      13.         android:xlargeScreens="true"
      14.         android:anyDensity="true"/>
      15.  
      16.     <application
      17.         android:icon="@drawable/app_icon"
      18.         android:label="@string/app_name"
      19.         android:debuggable="true">
      20.        
      21.         <!-- FLUCT/ZUCKS SDK -->
      22.         <meta-data android:name="MEDIA_ID" android:value="000000108"  />
      23.        
      24.         <activity android:name=".MyTapjoyPluginActivity" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation"
      25.             android:screenOrientation="portrait">
      26.             <intent-filter>
      27.                 <action android:name="android.intent.action.MAIN" />
      28.                 <category android:name="android.intent.category.LAUNCHER" />
      29.             </intent-filter>
      30.         </activity>
      31.  
      32.         <!-- Tapjoy -->
      33.         <activity android:name="com.tapjoy.TJCOffersWebView" android:configChanges="keyboardHidden|orientation" />
      34.         <activity android:name="com.tapjoy.TapjoyFeaturedAppWebView" android:configChanges="keyboardHidden|orientation" />
      35.         <activity android:name="com.tapjoy.TapjoyVideoView" android:configChanges="keyboardHidden|orientation" />
      36.         <!-- Tapjoy VG -->
      37.         <activity android:name="com.tapjoy.TJCVirtualGoods"
      38.             android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
      39.             android:configChanges="keyboardHidden|orientation" />
      40.         <activity android:name="com.tapjoy.DownloadVirtualGood"
      41.             android:theme="@android:style/Theme.Dialog" android:configChanges="keyboardHidden|orientation"
      42.             android:launchMode="singleTask" />
      43.                
      44.         <activity android:name="com.unity3d.player.UnityPlayerProxyActivity"
      45.                   android:label="@string/app_name"
      46.                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      47.         </activity>
      48.         <activity android:name="com.unity3d.player.UnityPlayerActivity"
      49.                   android:label="@string/app_name"
      50.                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      51.         </activity>
      52.         <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
      53.                   android:label="@string/app_name"
      54.                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      55.             <meta-data android:name="android.app.lib_name" android:value="unity" />
      56.             <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
      57.         </activity>
      58.         <activity android:name="com.unity3d.player.VideoPlayer"
      59.                   android:label="@string/app_name"
      60.                   android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
      61.         </activity>
      62.  
      63.         <!-- MY ANDROID PLUGIN ACTIVITIES START -->    
      64.         <activity android:name="jp.paperbooya.drteeth.GoogleAnalyticsUnityActivity"></activity>
      65.         <activity android:name="jp.paperbooya.drteeth.SmaadUnityActivity"></activity>
      66.         <activity android:name="jp.paperbooya.drteeth.ZucksUnityActivity"></activity>  
      67.        
      68.         <activity android:name="jp.gmotech.MoreApps.MoreAppsActivity" android:configChanges="orientation" android:theme="@android:style/Theme.NoTitleBar" >
      69.             <intent-filter>
      70.                 <action android:name="android.intent.action.VIEW" />
      71.                 <category android:name="android.intent.category.DEFAULT" />
      72.                 <category android:name="android.intent.category.BROWSABLE" />
      73.             </intent-filter>
      74.         </activity>
      75.         <!-- Used for install referrer tracking -->
      76.         <receiver android:name="com.google.android.apps.analytics.AnalyticsReceiver" android:exported="true" >
      77.             <intent-filter>
      78.                 <action android:name="com.android.vending.INSTALL_REFERRER" />
      79.             </intent-filter>
      80.         </receiver>
      81.  
      82.         <service android:name="jp.gmotech.MoreApps.MoreAppsIntentService" />
      83.         <!-- MY ANDROID PLUGIN ACTIVITIES END -->
      84.     </application>
      85.  
      86.     <!-- PERMISSIONS -->
      87.     <uses-permission android:name="android.permission.INTERNET"></uses-permission>
      88.     <uses-permission android:name="android.permission.GET_TASKS"></uses-permission>
      89.     <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
      90.     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
      91.     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
      92.    
      93. </manifest>
      94.  
      95.  
    10. Then in Unity I attached a C# script to the main scene containing these lines of code (strippped):
      Code (csharp):
      1.  
      2. using UnityEngine;
      3. using System.Collections;
      4. using System.Collections.Generic;
      5. using System.Runtime.InteropServices;
      6. using System;
      7.  
      8. public class Startup : MonoBehaviour
      9. {  
      10.     AndroidJavaClass jc;
      11.  
      12.     void Start() {
      13.         jc = new AndroidJavaClass("jp.paperbooya.drteeth.SmaadUnityActivity");
      14.     }
      15.    
      16.     void OnGUI ()
      17.     {
      18.         if(GUI.Button(new Rect(50, 200, 150, 50), "CLICK ME")){
      19.  
      20.             string saySmaad = jc.Call<string>("saySmaad");
      21.             string saySmaadStatic = jc.Call<string>("saySmaadStatic");
      22.             int sayFive = jc.Call<int>("sayFive");
      23.             int saySixStatic = jc.Call<int>("saySixStatic");
      24.            
      25.             Debug.Log("saySmaad: " + saySmaad);
      26.             Debug.Log("saySmaadStatic: " + saySmaadStatic);
      27.             Debug.Log("sayFive: " + sayFive);
      28.             Debug.Log("saySixStatic: " + saySixStatic);        
      29.         }
      30.     }  
      31. }  
      32.    
      33.  

    When I build and run the game on my Android device and click the button defined in the OnGUI() function I get one error message for calling the "saySixStatic()" function while the following calls just result in empty values:
    Note: the game itself runs without any crashes on the Android device.

    Here the error:
    Code (csharp):
    1.  
    2. 05-31 13:13:26.040: E/Unity(12111): getMethodID("saySixStatic", "()I") FAILED!
    3. 05-31 13:13:26.040: D/dalvikvm(12111): GetMethodID: not returning static method Ljp/paperbooya/drteeth/SmaadUnityActivity;.saySixStatic ()I
    4. 05-31 13:13:26.040: D/dalvikvm(12111): GetMethodID: method not found: Ljp/paperbooya/drteeth/SmaadUnityActivity;.saySixStatic:()I
    5. 05-31 13:13:26.050: I/Unity(12111): JNI: Unable to find method id for 'saySixStatic'
    6. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    7. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Log(Object)
    8.  
    And here the empty values without any error message:
    Code (csharp):
    1.  
    2. 05-31 13:13:26.050: I/Unity(12111): Startup:OnGUI()
    3. 05-31 13:13:26.050: I/Unity(12111):  
    4. 05-31 13:13:26.050: I/Unity(12111): (Filename: /Applications/buildAgent/work/300357e52574df36/Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)
    5. 05-31 13:13:26.050: I/Unity(12111): saySmaad:
    6. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    7. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Log(Object)
    8. 05-31 13:13:26.050: I/Unity(12111): Startup:OnGUI()
    9. 05-31 13:13:26.050: I/Unity(12111):  
    10. 05-31 13:13:26.050: I/Unity(12111): (Filename: /Applications/buildAgent/work/300357e52574df36/Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)
    11. 05-31 13:13:26.050: I/Unity(12111): saySmaadStatic:
    12. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    13. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Log(Object)
    14. 05-31 13:13:26.050: I/Unity(12111): Startup:OnGUI()
    15. 05-31 13:13:26.050: I/Unity(12111):  
    16. 05-31 13:13:26.050: I/Unity(12111): (Filename: /Applications/buildAgent/work/300357e52574df36/Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)
    17. 05-31 13:13:26.050: I/Unity(12111): sayFive: 0
    18. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    19. 05-31 13:13:26.050: I/Unity(12111): UnityEngine.Debug:Log(Object)
    20. 05-31 13:13:26.050: I/Unity(12111): Startup:OnGUI()
    21. 05-31 13:13:26.050: I/Unity(12111):  
    22. 05-31 13:13:26.050: I/Unity(12111): (Filename: /Applications/buildAgent/work/300357e52574df36/Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 43)
    23. 05-31 13:13:26.060: I/Unity(12111): saySixStatic: 0
    24. 05-31 13:13:26.060: I/Unity(12111): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    25. 05-31 13:13:26.060: I/Unity(12111): UnityEngine.Debug:Log(Object)
    26. 05-31 13:13:26.060: I/Unity(12111): Startup:OnGUI()
    27.  
    I've tried so many things by now but nothing seemed to work. I would be very grateful if someone can help me by showing what I am doing wrong.
    Thanks a lot for any help in advance.
     
  2. taar1

    taar1

    Joined:
    Jan 12, 2012
    Posts:
    26
    Okay it finally seems to work. I've added

    Code (csharp):
    1.  
    2. AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
    3. AndroidJavaObject jo = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");      
    4.  
    to it and then could call the (also non-static) functions from the Android Activity with
    Code (csharp):
    1.  
    2. string saySmaad = jc.CallStatic<string>("saySmaad");
    3.  
    No idea if that's the official solution but it works for me so far.
     
  3. Deleted User

    Deleted User

    Guest

    Could you give more information on how it was fixed? I have been struggling with plugins for the past 2 days.
     
  4. taar1

    taar1

    Joined:
    Jan 12, 2012
    Posts:
    26
    Ok seems like I was cheering too early. After it worked it stopped working and I didn't really know why.
    So I tried going through all the possibilities/combination. Here is my result:

    Code (csharp):
    1.  
    2. public class Startup : MonoBehaviour
    3. {
    4.     public static AndroidJavaClass jc;
    5.     public static AndroidJavaClass jc2;
    6.     public static AndroidJavaClass jc3;
    7.     public static AndroidJavaObject jo;
    8.     public static AndroidJavaObject jo2;
    9.     public static AndroidJavaObject jo3;
    10.  
    11.     public static void init()
    12.         {
    13.             jc = new AndroidJavaClass("jp.paperbooya.drteeth.SmaadUnityActivity");
    14.             AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
    15.             jo = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
    16.            
    17.             // Get the activity context for Android.
    18.             jc2 = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
    19.             jo2 = jc2.GetStatic<AndroidJavaObject>("currentActivity");
    20.            
    21.             // Create java class object.
    22.             jc3 = new AndroidJavaClass("jp.paperbooya.drteeth.SmaadUnityActivity");
    23.         }      
    24.  
    25.         void OnGUI ()
    26.         {
    27.             if(GUI.Button(new Rect(50, 200, 150, 50), "CLICK ME")){
    28.                 Debug.Log("NON STATIC");
    29.                 Debug.Log(jc.Call<string>("saySmaad")); // NOT OK
    30.                 Debug.Log(jc2.Call<string>("saySmaad")); // NOT OK
    31.                 Debug.Log(jc3.Call<string>("saySmaad")); // NOT OK
    32.                 Debug.Log(jo.Call<string>("saySmaad")); // NOT OK
    33.                 Debug.Log(jo2.Call<string>("saySmaad")); // NOT OK
    34.                
    35.                 Debug.Log("STATIC");
    36.                 Debug.Log(jc.CallStatic<string>("saySmaad")); // WORKS!!!!!!!
    37.                 Debug.Log(jc2.CallStatic<string>("saySmaad")); // NOT OK
    38.                 Debug.Log(jc3.CallStatic<string>("saySmaad")); // WORKS!!!!!!!
    39.                 Debug.Log(jo.CallStatic<string>("saySmaad")); // NOT OK
    40.                 Debug.Log(jo2.CallStatic<string>("saySmaad")); // NOT OK
    41.             }
    42.         }
    43. }
    44.  
    Using the AndroidJavaClass directly seems to work when using CallStatic() (even though in the Android project the function is not static...
    So basically I have no idea why it's working...

    Another problem I have is that I want to use this function from my Android project:
    Code (csharp):
    1.  
    2.     public void showSmaadMoreGames() {
    3.         Intent i = new Intent(getApplication(), MoreAppsActivity.class);
    4.         i.putExtra("MoreAppsZoneId", "1111111111");
    5.         startActivity(i);
    6.     }
    7.  
    It should open a new view displaying some ads full screen. If I call this function inside the C# script I get an error. If anyone could give me some help how I can successfully use that function to display ads in the Unity Android project I would be very grateful.
    Thanks a lot in advance.
     
  5. taar1

    taar1

    Joined:
    Jan 12, 2012
    Posts:
    26
    Okay I finally got it working - at least a part of it! This is by all means not a perfect solution but it worked for me!
    Here is how:

    Android Activity:
    =================

    Code (csharp):
    1.  
    2. import jp.gmotech.MoreApps.MoreAppsActivity;
    3. import android.content.Intent;
    4. import android.os.Bundle;
    5.  
    6. import com.unity3d.player.UnityPlayer;
    7. import com.unity3d.player.UnityPlayerActivity;
    8.  
    9. public class SmaadUnityActivity extends UnityPlayerActivity {
    10.  
    11.     @Override
    12.     public void onCreate(Bundle savedInstanceState) {
    13.         super.onCreate(savedInstanceState);
    14.     }
    15.  
    16.     public static void showSmaadMoreGamesScreen() {
    17.         UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
    18.             public void run() {
    19.                 Intent intent = new Intent(UnityPlayer.currentActivity.getApplicationContext(), MoreAppsActivity.class);
    20.                 intent.putExtra("MoreAppsZoneId", "11111111");
    21.                 UnityPlayer.currentActivity.startActivity(intent);
    22.             }
    23.  
    24.         });
    25.     }
    26. }
    27.  
    Note: MoreAppsActivity.class is a part of the SMAAD SDK Jar file to display some a screen with "more apps" (basically it's advertisings).

    C# Unity script:
    ================

    Code (csharp):
    1.  
    2. public class Startup : MonoBehaviour
    3. {
    4.     public static AndroidJavaClass jc;
    5.    
    6.     void Start() {
    7.         init();
    8.     }
    9.    
    10.     public static void init()
    11.     {
    12.         jc = new AndroidJavaClass("jp.paperbooya.drteeth.SmaadUnityActivity");
    13.     }
    14.  
    15.     void OnGUI () {
    16.         if(GUI.Button(new Rect(10, 200, 150, 120), "SHOW INTENT")){
    17.             jc.CallStatic("showSmaadMoreGamesScreen");
    18.         }
    19.     }
    20. }
    21.  
    This displays the intent in the Android function showSmaadMoreGamesScreen() when clicking on the SHOW INTENT button.
    Hope that helps!

    Oh by the way, you do NOT need to copy the SRC/ and BIN/ files from the Android project to Unity.

    I'm still having problems getting a normal banner being displayed on top of the screen somewhere (not a whole intent, though). If anyone has some help how to do so please post it here! Thanks a lot!
     
    Last edited: Jun 1, 2012
  6. taar1

    taar1

    Joined:
    Jan 12, 2012
    Posts:
    26
  7. cenghover

    cenghover

    Joined:
    Sep 25, 2012
    Posts:
    9
    Thanks for sharing :)
     
  8. cenghover

    cenghover

    Joined:
    Sep 25, 2012
    Posts:
    9
    here is the magic I think:

    UnityPlayer.currentActivity.runOnUiThread(new Runnable() {

    @Override
    public void run() {
    }
    });
     
  9. iRetrograde

    iRetrograde

    Joined:
    Oct 13, 2011
    Posts:
    93
    Hey everyone,

    I've been trying to get a plugin to work on Android for Parse SDK and I've been having some issues. I'm trying to get some eyeballs on the problem, if anyone here would be so kind as to read the issue that I'm running into, that would be excellent.

    Basically, my plugin runs the first time perfectly and then after trying to shut things down, I start running into issues.

    Question can be found by clicking here.