示例#1
0
        public void ShowArchiveListIntent(String title, Boolean allowAddBtn, Boolean allowDeleteBtn, int maxArchive, Action <ArchiveSummary> selectedAction, Action <bool> addAction)
        {
            ITask <AndroidIntent> task = CallAsWrapper <TaskJavaObjectWrapper <AndroidIntent> >("getShowArchiveListIntent", title, allowAddBtn, allowDeleteBtn, maxArchive);

            task.AddOnSuccessListener((result) =>
            {
                var callback = new GenericBridgeCallbackWrapper().AddOnSuccessListener((success) =>
                {
                    if (success.GetHasExtra(ArchiveConstants.ARCHIVE_SELECT))
                    {
                        AndroidBundle bundle = success.GetParcelableExtra <AndroidBundle>(ArchiveConstants.ARCHIVE_SELECT);
                        ITask <ArchiveSummary> taskSummary = this.ParseSummary(bundle);
                        taskSummary.AddOnSuccessListener(selectedAction);
                    }
                    else if (success.GetHasExtra(ArchiveConstants.ARCHIVE_ADD))
                    {
                        addAction(true);
                    }
                })
                               .AddOnFailureListener((onFailure) =>
                {
                    Debug.Log("[HMS] Show Archive Listener List Fail: " + onFailure.WrappedExceptionMessage);
                });
                sJavaClass.CallStatic("receiveShow", result.Intent, callback);
            }).AddOnFailureListener((onFailure) =>
            {
                Debug.Log("[HMS] Show Archive List Intent Fail: " + onFailure.WrappedExceptionMessage);
            });
        }
        public Notification()
        {
            data      = new AndroidBundle();
            resIdMan  = ResourceIdManagaer.Instance;
            setFields = new HashSet <string>();

            this.id = -1;

            // set the needed data for notification to open the game
            data.Put <string>("app_package_name", Application.identifier);
        }
示例#3
0
        internal static IBundle?GetState(this Bundle bundle, string key)
        {
            IBundle?state             = null;
            var     stateNativeBundle = bundle.GetBundle(key);

            if (stateNativeBundle != null)
            {
                state = new AndroidBundle(stateNativeBundle);
            }

            return(state);
        }
		public ITask<ArchiveSummary> ParseSummary(AndroidBundle paramBundle) =>
			CallAsWrapper<TaskJavaObjectWrapper<ArchiveSummary>>("parseSummary", paramBundle);
示例#5
0
 public void onEvent(String eventId, AndroidBundle androidBundle)
 {
     Call("onEvent", eventId, androidBundle);
 }