将与unity交互的代码移至JcSDK
This commit is contained in:
parent
5926cab906
commit
342af74b54
@ -20,7 +20,32 @@
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
|
||||
</activity>
|
||||
</application>
|
||||
<supports-screens
|
||||
android:anyDensity="true"
|
||||
android:largeScreens="true"
|
||||
android:normalScreens="true"
|
||||
android:smallScreens="true"
|
||||
android:xlargeScreens="true" />
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen.multitouch"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen.multitouch.distinct"
|
||||
android:required="false" />
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="18" />
|
||||
<uses-permission
|
||||
android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="18" />
|
||||
</manifest>
|
@ -46,7 +46,7 @@ android {
|
||||
sourceSets.main {
|
||||
java.srcDirs "../src", "src"
|
||||
res.srcDirs "../res", 'res'
|
||||
jniLibs.srcDirs "../libs", 'libs'
|
||||
jniLibs.srcDirs "../libs", 'libs', '/Users/zhl/Documents/workspace/unity/first/android/first/src/main/jniLibs'
|
||||
manifest.srcFile "AndroidManifest.xml"
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17
app/src/com/jc/jcfw/JcSDK.java
Normal file
17
app/src/com/jc/jcfw/JcSDK.java
Normal file
@ -0,0 +1,17 @@
|
||||
package com.jc.jcfw;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public class JcSDK {
|
||||
private static final String TAG = JcSDK.class.getSimpleName();
|
||||
private static UnityCallback commonCB;
|
||||
public static void initCommonCB(UnityCallback callBack) {
|
||||
Log.i(TAG, "call init common callback from unity");
|
||||
commonCB = callBack;
|
||||
}
|
||||
|
||||
public static void initWallet(String password) {
|
||||
Log.i(TAG, "call init wallet from unity with password: " + password);
|
||||
commonCB.stringCallback("wallet init success");
|
||||
}
|
||||
}
|
5
app/src/com/jc/jcfw/UnityCallback.java
Normal file
5
app/src/com/jc/jcfw/UnityCallback.java
Normal file
@ -0,0 +1,5 @@
|
||||
package com.jc.jcfw;
|
||||
|
||||
public interface UnityCallback {
|
||||
public void stringCallback(String str);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user