Permalink
Browse files

for 2.0.1的桥接调整

  • Loading branch information...
lity-lee committed Oct 24, 2017
1 parent f5a8c62 commit aa4726be094c89e2a800b6a6069d3d1cdd0c8977
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -4,8 +4,8 @@
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="preferExternal"
android:versionCode="200"
android:versionName="2.0.0">
android:versionCode="201"
android:versionName="2.0.1">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
@@ -28,7 +28,7 @@
android:label="@string/app_name"
android:debuggable="true">
<meta-data android:name="Mob-AppKey" android:value="1b8898cb51ccb"/>
<activity android:name="com.mob.moblink.unity.UnityPlayerActivity"
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name"
android:clearTaskOnLaunch="false"
android:launchMode="singleInstance" >

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -14,14 +14,18 @@ public class AndroidMobLinkImpl : MobLinkImpl {
public const string MOB_RESTORE_CALLBACK_METHOD = "_RestoreCallBack";
private bool isInited = false;
private bool isUpdateIntent = true;
public override void setRestoreSceneListener ()
{
initMobSdk ();
AndroidJavaClass javaMoblink = getAndroidMoblink();;
AndroidJavaObject l = new AndroidJavaObject ("com.mob.moblink.unity.RestoreSceneListener", MOB_GAMEOBJECT_NAME, MOB_RESTORE_CALLBACK_METHOD);
javaMoblink.CallStatic ("setRestoreSceneListener", l);
updateIntent ();
if (isUpdateIntent) {
isUpdateIntent = false;
updateIntent ();
}
}
public override void GetMobId (MobLinkScene scene) {
@@ -31,11 +35,13 @@ public override void setRestoreSceneListener ()
private void GetMobId (string path, string source, Hashtable param) {
initMobSdk ();
object map = hashtable2JavaMap(param);
AndroidJavaClass javaClazz = new AndroidJavaClass ("com.mob.moblink.Scene");
object scene = javaClazz.CallStatic<AndroidJavaObject> ("fromMap", map);
object l = new AndroidJavaObject ("com.mob.moblink.unity.ActionListener", MOB_GAMEOBJECT_NAME, MOB_GETMOBID_CALLBACK_SUCCESS_METHOD, MOB_GETMOBID_CALLBACK_FAIL_METHOD);
// call java sdk
AndroidJavaClass javaMoblink = getAndroidMoblink ();
javaMoblink.CallStatic ("getMobID", map, path, source, l);
javaMoblink.CallStatic ("getMobID", scene, l);
}
private void updateIntent() {
@@ -1,12 +1,12 @@
<Properties StartupItem="Assembly-CSharp.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
<MonoDevelop.Ide.Workbench />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
<Breakpoint file="D:\workspace\Unity-For-MobLink\Unity3D-MobLink\Assets\SceneA.cs" line="40" column="1" />
<Breakpoint file="D:\workspace\Unity-For-MobLink\Unity3D-MobLink\Assets\SceneA.cs" line="16" column="1" />
<Breakpoint file="D:\workspace\Unity-For-MobLink\Unity3D-MobLink\Assets\Demo.cs" line="144" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<Properties StartupItem="Assembly-CSharp.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
<MonoDevelop.Ide.Workbench />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
<Breakpoint file="D:\workspace\Unity-For-MobLink\Unity3D-MobLink\Assets\SceneA.cs" line="40" column="1" />
<Breakpoint file="D:\workspace\Unity-For-MobLink\Unity3D-MobLink\Assets\SceneA.cs" line="16" column="1" />
<Breakpoint file="D:\workspace\Unity-For-MobLink\Unity3D-MobLink\Assets\Demo.cs" line="144" column="1" />
</BreakpointStore>
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>

0 comments on commit aa4726b

Please sign in to comment.