Exemple #1
0
        public static ApiArStatus RequestInstall(int userRequestInstall, ref ApiArInstallStatus installStatus)
        {
            AndroidJavaClass  unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
            AndroidJavaObject activity    = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity");

            return(ExternApi.arApplicationApkRequestInstall(activity.GetRawObject(), userRequestInstall, ref installStatus));
        }
Exemple #2
0
        void Start()
        {
            SenseARInstance = null;
            axisInstance    = null;
            CloundRoom      = GetComponent <HelloARCloud_CloundRoomManager>();
            slamController  = null;
            permissionUtil  = GameObject.Find("Instantiate").GetComponent <AndroidPermissionUtil>();


            prevTouches  = new Touch[2];
            selectedObj_ = null;
            bPlaceModel  = true;

            ApiArAvailability arAvailability = ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED;

            NativeSession.CheckApkAvailability(ref arAvailability);
            if (arAvailability == ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED)
            {
                ApiArInstallStatus status = ApiArInstallStatus.AR_INSTALL_STATUS_INSTALL_REQUESTED;
                NativeSession.RequestInstall(1, ref status);
            }


            NativeSession.CheckAuthorized(getAppId());
        }
    void Start()
    {
        SenseARInstance = null;
        axisInstance    = null;
        slamController  = null;
        permissionUtil  = GameObject.Find("Instantiate").GetComponent <AndroidPermissionUtil>();

        ApiArAvailability arAvailability = ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED;

        NativeSession.CheckApkAvailability(ref arAvailability);
        if (arAvailability == ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED)
        {
            ApiArInstallStatus status = ApiArInstallStatus.AR_INSTALL_STATUS_INSTALL_REQUESTED;
            NativeSession.RequestInstall(1, ref status);
        }

        if (shotButton)
        {
            shotButton.gameObject.SetActive(false);
        }


        NativeSession.CheckAuthorized(getAppId());

        if (type == ReferenceImageType.Patt)
        {
            StartCoroutine(ReadConfig());
            StartCoroutine(ReadPatts());
        }

        if (type == ReferenceImageType.Database)
        {
            StartCoroutine(ReadImageDatabase());
        }
    }
Exemple #4
0
    void Start()
    {
        SenseARInstance = null;
        axisInstance    = null;
        slamController  = null;
        permissionUtil  = GameObject.Find("Instantiate").GetComponent <AndroidPermissionUtil>();

        prevTouches  = new Touch[2];
        selectedObj_ = null;
        bPlaceModel  = true;

        ApiArAvailability arAvailability = ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED;

        NativeSession.CheckApkAvailability(ref arAvailability);
        if (arAvailability != ApiArAvailability.AR_AVAILABILITY_SUPPORTED_INSTALLED)
        {
            ApiArInstallStatus status = ApiArInstallStatus.AR_INSTALL_STATUS_INSTALL_REQUESTED;
            NativeSession.RequestInstall(1, ref status);
        }

        if (shotButton)
        {
            shotButton.gameObject.SetActive(false);
        }


        ApiArStatus ret = NativeSession.CheckAuthorized(getAppId());
    }
    public void InitiateAPI()
    {
        senseARInstance       = null;
        senseARSLAMController = null;
        ApiArAvailability arAvailability = ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED;

        NativeSession.CheckApkAvailability(ref arAvailability);
        if (arAvailability != ApiArAvailability.AR_AVAILABILITY_SUPPORTED_INSTALLED)
        {
            ApiArInstallStatus status = ApiArInstallStatus.AR_INSTALL_STATUS_INSTALL_REQUESTED;
            NativeSession.RequestInstall(1, ref status);
        }
        ApiArStatus ret = NativeSession.CheckAuthorized(getAppId());
    }
    void start()
    {
        //Init
        SenseARInstance = null;
        axisInstance    = null;
        slamController  = null;

        ApiArAvailability arAvailability = ApiArAvailability.AR_AVAILABILITY_SUPPORTED_NOT_INSTALLED;

        NativeSession.CheckApkAvailability(ref arAvailability);
        if (arAvailability != ApiArAvailability.AR_AVAILABILITY_SUPPORTED_INSTALLED)
        {
            ApiArInstallStatus status = ApiArInstallStatus.AR_INSTALL_STATUS_INSTALL_REQUESTED;
            NativeSession.RequestInstall(1, ref status);
        }
        ApiArStatus ret = NativeSession.CheckAuthorized(getAppId());

        //Starting Location For Compass and GPS
        Input.location.Start();
    }
Exemple #7
0
 public static extern ApiArStatus arApplicationApkRequestInstall(IntPtr activity, int user_requested_install, ref ApiArInstallStatus out_install_status);