|
11 | 11 | import com.instabug.library.Instabug;
|
12 | 12 | import com.instabug.library.invocation.InstabugInvocationEvent;
|
13 | 13 |
|
| 14 | +import java.lang.reflect.Array; |
| 15 | +import java.lang.reflect.InvocationTargetException; |
| 16 | +import java.lang.reflect.Method; |
| 17 | +import java.lang.reflect.Parameter; |
14 | 18 | import java.util.ArrayList;
|
15 | 19 | import java.util.Arrays;
|
16 | 20 | import java.util.Collections;
|
| 21 | +import java.util.HashMap; |
| 22 | +import java.util.Iterator; |
17 | 23 | import java.util.List;
|
| 24 | +import java.util.Map; |
| 25 | + |
| 26 | +import android.os.Handler; |
| 27 | +import android.os.Looper; |
| 28 | +import android.util.Log; |
18 | 29 |
|
19 | 30 | // import com.instabug.library.InstabugColorTheme;
|
20 | 31 | // import com.instabug.library.InstabugCustomTextPlaceHolder;
|
|
23 | 34 |
|
24 | 35 | /** InstabugFlutterPlugin */
|
25 | 36 | public class InstabugFlutterPlugin implements MethodCallHandler {
|
26 |
| - |
27 |
| - private ArrayList<InstabugInvocationEvent> invocationEvents = new ArrayList<>(); |
| 37 | + |
| 38 | + |
| 39 | + private Map<String, Object> constants = getConstants(); |
28 | 40 |
|
29 | 41 | /** Plugin registration. */
|
30 | 42 | public static void registerWith(Registrar registrar) {
|
@@ -65,4 +77,13 @@ public void start(Application application, String token) {
|
65 | 77 | new Instabug.Builder(application, token).build();
|
66 | 78 | }
|
67 | 79 |
|
| 80 | + public Map<String, Object> getConstants() { |
| 81 | + final Map<String, Object> constants = new HashMap<>(); |
| 82 | + constants.put("InvocationEvent.none", InstabugInvocationEvent.NONE); |
| 83 | + constants.put("InvocationEvent.screenshot", InstabugInvocationEvent.SCREENSHOT); |
| 84 | + constants.put("InvocationEvent.twoFingersSwipeLeft", InstabugInvocationEvent.TWO_FINGER_SWIPE_LEFT); |
| 85 | + constants.put("InvocationEvent.floatingButton", InstabugInvocationEvent.FLOATING_BUTTON); |
| 86 | + constants.put("InvocationEvent.shake", InstabugInvocationEvent.SHAKE); |
| 87 | + return constants; |
| 88 | + } |
68 | 89 | }
|
0 commit comments