Skip to content

Commit be82f1c

Browse files
author
sagi
committed
bug fixes
1 parent eba0376 commit be82f1c

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

Android/build_jar.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ export UNITY_LIBS
66
ANDROID_SDK_ROOT="/kankado/dev/tools/android-sdk-macosx"
77
export ANDROID_SDK_ROOT
88

9-
BOOTCLASSPATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib
9+
JDK_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
10+
export JDK_HOME
11+
12+
BOOTCLASSPATH=$JDK_HOME/jre/lib
1013
export BOOTCLASSPATH
14+
1115
CLASSPATH=$UNITY_LIBS:$ANDROID_SDK_ROOT/platforms/android-23/android.jar
1216
export CLASSPATH
1317

1418
echo "Compiling ..."
1519
echo $BOOTCLASSPATH
1620
echo $CLASSPATH
17-
javac *.java -bootclasspath $BOOTCLASSPATH -classpath $CLASSPATH -d . -target 1.7 -source 1.7
21+
$JDK_HOME/bin/javac *.java -bootclasspath $BOOTCLASSPATH -classpath $CLASSPATH -d .
1822

1923
echo "Manifest-Version: 1.0" > MANIFEST.MF
2024

UnityDeeplinks.cs

+17-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
using UnityEngine;
22
using System.Collections;
33
using System.Collections.Generic;
4+
using System.Runtime.InteropServices;
45

56
public class UnityDeeplinks : MonoBehaviour {
67

8+
#if UNITY_IOS
9+
[DllImport("__Internal")]
10+
private static extern void UnityDeeplinks_init(string gameObject = null, string deeplinkMethod = null);
11+
#endif
12+
713
// Use this for initialization
814
void Start () {
9-
15+
#if UNITY_IOS
16+
if (Application.platform == RuntimePlatform.IPhonePlayer) {
17+
UnityDeeplinks_init(gameObject.name);
18+
}
19+
#endif
1020
}
1121

1222
// Update is called once per frame
1323
void Update () {
1424

1525
}
1626

17-
public void onDeeplink(string deeplink) {
27+
public void onDeeplink2(string deeplink) {
1828
Debug.Log("onDeeplink " + deeplink);
29+
// Dictionary<string, string> values = new Dictionary<string, string>();
30+
// values.Add("link", deeplink);
31+
// AppsFlyer.trackRichEvent("deeplink", values);
1932
}
33+
34+
2035
}

0 commit comments

Comments
 (0)