-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67d4e91
commit 75b2d86
Showing
16 changed files
with
138 additions
and
140 deletions.
There are no files selected for viewing
Binary file not shown.
18 changes: 18 additions & 0 deletions
18
Android/com/phantomsxr/armodplugin/ARMODEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.phantomsxr.armodplugin; | ||
|
||
public interface ARMODEventListener { | ||
void onDeviceNotSupport(); | ||
void onAddLoadingOverlay(); | ||
void onUpdateLoadingProgress(float progress); | ||
void onRemoveLoadingOverlay(); | ||
void onThrowException(String errorMsg,int errorCode); | ||
void onNeedInstallARCoreService(); | ||
void onSdkInitialized(); | ||
void onOpenBuiltInBrowser(String url); | ||
void onRecognitionStart(); | ||
void onRecognitionComplete(); | ||
void onTryAcquireInformation(String opTag,AndroidCallback androidCallback); | ||
void onPackageSizeMoreThanPresetSize(String currentSize,String presetSize); | ||
void onARMODExit(); | ||
void onARMODLaunch(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.phantomsxr.armodplugin; | ||
|
||
|
||
public interface AndroidCallback{ | ||
public void TryAcquireInformationCallback(String _info); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.phantomsxr.armodplugin; | ||
|
||
import com.unity3d.player.UnityPlayer; | ||
import java.util.concurrent.CopyOnWriteArraySet; | ||
|
||
public class Utils { | ||
private final String EntryPoint = "EntryPoint"; | ||
public final CopyOnWriteArraySet<ARMODEventListener> mARMODEventListeners = new CopyOnWriteArraySet<ARMODEventListener>(); | ||
|
||
private static Utils instance = null; | ||
private Utils(){} | ||
static{ | ||
instance = new Utils(); | ||
} | ||
|
||
public static Utils getInstance(){ | ||
return instance; | ||
} | ||
|
||
/** | ||
* Call SDK internal method | ||
* | ||
* @param _methodName Call method name | ||
* @param _data transfer data | ||
*/ | ||
public void callSDKMethod(String _methodName, String _data) { | ||
if (isInitialized()) { | ||
UnityPlayer.UnitySendMessage(EntryPoint, _methodName, _data); | ||
} else { | ||
System.out.println("You can not send anything message to AR,Because SDK is not initialize"); | ||
} | ||
} | ||
|
||
/** | ||
* Determine whether the SDK is initialized | ||
* | ||
* @return False False means that it has not been initialized, and True means that the initialization is successful | ||
*/ | ||
public boolean isInitialized() { | ||
return BaseARMODActivity.armodPlayer != null; | ||
} | ||
|
||
/** | ||
* Add AR-MOD SDK callback listener to listener array | ||
* @param listener callback listener | ||
*/ | ||
public void addARMODEventListener(ARMODEventListener listener){ | ||
mARMODEventListeners.add(listener); | ||
} | ||
|
||
/** | ||
* Remove AR-MOD SDK callback listener from listener array | ||
* @param listener callback listener | ||
*/ | ||
public void removeARMODEventListener(ARMODEventListener listener){ | ||
mARMODEventListeners.remove(listener); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file renamed
BIN
+43.4 MB
Android/libs/unityLibrary-release.aar → ...phantomsxr-unityLibrary_release-0.0.4.aar
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.