Browse Source

Add onRequestPermissionsResult to ActivityCallbacks (#737)

Guy Carmeli 8 years ago
parent
commit
4a3d57efec

+ 4
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/ActivityCallbacks.java View File

32
     public void onActivityDestroyed(Activity activity) {
32
     public void onActivityDestroyed(Activity activity) {
33
 
33
 
34
     }
34
     }
35
+
36
+    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
37
+
38
+    }
35
 }
39
 }

+ 1
- 0
android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java View File

341
     }
341
     }
342
 
342
 
343
     public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
343
     public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
344
+        NavigationApplication.instance.getActivityCallbacks().onRequestPermissionsResult(requestCode, permissions, grantResults);
344
         if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
345
         if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
345
             mPermissionListener = null;
346
             mPermissionListener = null;
346
         }
347
         }