Skip to content

Commit

Permalink
Ignore permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
XomaDev committed Dec 5, 2023
1 parent 83218f3 commit a753bd3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/xyz/kumaraswamy/itoox/InstanceForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.google.appinventor.components.runtime.AndroidViewComponent;
import com.google.appinventor.components.runtime.Component;
import com.google.appinventor.components.runtime.Form;
import com.google.appinventor.components.runtime.PermissionResultHandler;
import com.google.appinventor.components.runtime.util.BulkPermissionRequest;
import gnu.mapping.SimpleEnvironment;
import gnu.mapping.Symbol;
import java.lang.reflect.Field;
Expand Down Expand Up @@ -142,6 +144,18 @@ public void dispatchGenericEvent(Component component, String eventName, boolean
}
}

@Override
public void askPermission(String permission, PermissionResultHandler responseRequestor) {
// we are not allowed to ask for permissions in the background
responseRequestor.HandlePermissionResponse(permission, true);
}

@Override
public void askPermission(BulkPermissionRequest request) {
// we are not allowed to ask for permissions in the background
request.onGranted();
}

@Override
public void onDestroy() {
// prevent default behaviour
Expand Down

0 comments on commit a753bd3

Please sign in to comment.