Add support for onRequestPermissionsResult()
Credit goes to @vanyasem https://github.com/vanyasem/Godot-AndroidPermissions But this is a much needed feature to support Android beyond API 21. Fixed style errors again.
This commit is contained in:
parent
9108b5fba5
commit
39738d1866
1 changed files with 10 additions and 0 deletions
|
@ -184,6 +184,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
||||||
protected void onMainActivityResult(int requestCode, int resultCode, Intent data) {
|
protected void onMainActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void onMainRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||||
|
}
|
||||||
|
|
||||||
protected void onMainPause() {}
|
protected void onMainPause() {}
|
||||||
protected void onMainResume() {}
|
protected void onMainResume() {}
|
||||||
protected void onMainDestroy() {}
|
protected void onMainDestroy() {}
|
||||||
|
@ -251,6 +254,13 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||||
|
for (int i = 0; i < singleton_count; i++) {
|
||||||
|
singletons[i].onMainRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
public void onVideoInit() {
|
public void onVideoInit() {
|
||||||
|
|
||||||
boolean use_gl3 = getGLESVersionCode() >= 0x00030000;
|
boolean use_gl3 = getGLESVersionCode() >= 0x00030000;
|
||||||
|
|
Loading…
Reference in a new issue