public void CallFeedActivity(string filePath, OnFeedCompleted OnCompleted) { Debug.LogFormat("CallFeedActivity. path : {0}", filePath); _onFeedCompleted = OnCompleted; #if UNITY_ANDROID && !UNITY_EDITOR using (javaClass = new AndroidJavaClass("com.feed.plugin.BridgeCls")) { if (javaClass != null) { javaClassInstance = javaClass.CallStatic <AndroidJavaObject>("instance"); javaClassInstance.Call("startFeedActivity", activityContext, filePath); //"/storage/emulated/0/temp_photo.jpg"); } } #elif UNITY_IOS && !UNITY_EDITOR iOSPanel.gameObject.SetActive(true); staticPanel = iOSPanel; if (Application.platform == RuntimePlatform.IPhonePlayer) { IOSFeed(closeiOSHandler, filePath); //"sample.jpg"); } #endif }
public void CallGalleryFeed(OnFeedCompleted OnCompleted) { Debug.Log("CallGalleryFeed"); _onFeedCompleted = OnCompleted; #if UNITY_ANDROID && !UNITY_EDITOR using (javaClass = new AndroidJavaClass("com.feed.plugin.BridgeCls")) { Debug.LogFormat(" javaClass {0}", javaClass); if (javaClass != null) { javaClassInstance = javaClass.CallStatic <AndroidJavaObject>("instance"); Debug.LogFormat(" javaClassInstance {0}", javaClass); javaClassInstance.Call("startGalleryActivity", activityContext); } } #elif UNITY_IOS && !UNITY_EDITOR iOSPanel.gameObject.SetActive(true); staticPanel = iOSPanel; if (Application.platform == RuntimePlatform.IPhonePlayer) { IOSshowView(closeiOSHandler); } #endif }
void Feed(string strPath) { Debug.LogFormat("FeedModule.Feed : {0}", strPath); if (_onFeedCompleted != null) { Debug.LogFormat("_onFeedCompleted. message : {0}, discovery : {1}, imageCount :{2}", _feedMessage, _discoveryImagePath, _imagePathList.Count); for (int i = 0; i != _imagePathList.Count; ++i) { Debug.LogFormat("image {0} [{1}]", i, _imagePathList[i]); } _onFeedCompleted(_feedMessage, _discoveryImagePath, _imagePathList.ToArray()); _onFeedCompleted = null; } _feedMessage = ""; _discoveryImagePath = ""; _imagePathList.Clear(); }
void AddImagePath(string strPath) { Debug.LogFormat("FeedModule.AddImagePath : {0}", strPath); _imagePathList.Clear(); var images = strPath.Split('|'); Debug.LogFormat("AddImagePath image count : [{0}]", images?.Length); for (int i = 0; i != images.Length; ++i) { Debug.LogFormat("AddImagePath image : [{0} : {1}]", i, images[i]); _imagePathList.Add(images[i]); } if (_imagePathList.Count == 1 && _imagePathList[0].Equals("BACK")) { if (_onFeedCompleted != null) { _onFeedCompleted(_feedMessage, _discoveryImagePath, _imagePathList.ToArray()); _onFeedCompleted = null; } } }