diff --git a/android/src/main/kotlin/com/bhikadia/receive_intent/ReceiveIntentPlugin.kt b/android/src/main/kotlin/com/bhikadia/receive_intent/ReceiveIntentPlugin.kt index 98d6c42..993a18f 100644 --- a/android/src/main/kotlin/com/bhikadia/receive_intent/ReceiveIntentPlugin.kt +++ b/android/src/main/kotlin/com/bhikadia/receive_intent/ReceiveIntentPlugin.kt @@ -3,7 +3,6 @@ package com.bhikadia.receive_intent import android.app.Activity import android.content.Context import android.content.Intent -import android.util.Log import androidx.annotation.NonNull import io.flutter.embedding.engine.plugins.FlutterPlugin import io.flutter.embedding.engine.plugins.activity.ActivityAware @@ -47,9 +46,9 @@ class ReceiveIntentPlugin : FlutterPlugin, MethodCallHandler, EventChannel.Strea } private fun handleIntent(intent: Intent, fromPackageName: String?) { - Log.e("ReceiveIntentPlugin", "intent: $intent") - Log.e("ReceiveIntentPlugin", "fromPackageName: $fromPackageName") - Log.e("ReceiveIntentPlugin", "intentMap: " + intentToMap(intent, fromPackageName)) + //Log.e("ReceiveIntentPlugin", "intent: $intent") + //Log.e("ReceiveIntentPlugin", "fromPackageName: $fromPackageName") + //Log.e("ReceiveIntentPlugin", "intentMap: " + intentToMap(intent, fromPackageName)) if (initialIntent) { initialIntentMap = intentToMap(intent, fromPackageName) initialIntent = false @@ -62,8 +61,7 @@ class ReceiveIntentPlugin : FlutterPlugin, MethodCallHandler, EventChannel.Strea if (resultCode != null) { if (data == null) { activity?.setResult(resultCode) - } - else { + } else { val json = JSONObject(data) activity?.setResult(resultCode, jsonToIntent(json)) } diff --git a/android/src/main/kotlin/com/bhikadia/receive_intent/Utils.kt b/android/src/main/kotlin/com/bhikadia/receive_intent/Utils.kt index 625fcb0..b27ea98 100644 --- a/android/src/main/kotlin/com/bhikadia/receive_intent/Utils.kt +++ b/android/src/main/kotlin/com/bhikadia/receive_intent/Utils.kt @@ -67,14 +67,14 @@ fun wrap(o: Any?): Any? { } try { if (o is Collection<*>) { - Log.e("ReceiveIntentPlugin", "$o is Collection<*>") + //Log.e("ReceiveIntentPlugin", "$o is Collection<*>") return JSONArray(o as Collection<*>?) } else if (o.javaClass.isArray) { - Log.e("ReceiveIntentPlugin", "$o is isArray") + //Log.e("ReceiveIntentPlugin", "$o is isArray") return toJSONArray(o) } if (o is Map<*, *>) { - Log.e("ReceiveIntentPlugin", "$o is Map<*, *>") + //Log.e("ReceiveIntentPlugin", "$o is Map<*, *>") return JSONObject(o as Map<*, *>?) } if (o is Boolean || @@ -92,8 +92,7 @@ fun wrap(o: Any?): Any? { return o.toString() } } catch (e: Exception) { - Log.e("ReceiveIntentPlugin", e.message, e) - e.printStackTrace() + //Log.e("ReceiveIntentPlugin", e.message, e) } return null }