NightRaven
Member
I get this error below on cl_appupdate
This line 90 of cl_appupdate
This is line 1448 of activityhome.java
B4X:
null receiver
java.lang.reflect.Field.get(Native Method)
anywheresoftware.b4j.object.JavaObject.InitializeContext(JavaObject.java.57)
b4a.example.cl_appupdate._canrequestpackageinstalls(cl_appupdate.java:90)
b4a.example.activityhome$ResumableSub_CheckInstallationRequirements.resume(activityhome.java:1448)
This line 90 of cl_appupdate
B4X:
anywheresoftware.b4j.object.JavaObject _ctxt = null;
anywheresoftware.b4j.object.JavaObject _packagemanager = null;
//BA.debugLineNum = 448;BA.debugLine="Public Sub CanRequestPackageInstalls As Boolean";
//BA.debugLineNum = 449;BA.debugLine="Dim ctxt As JavaObject";
_ctxt = new anywheresoftware.b4j.object.JavaObject();
//BA.debugLineNum = 450;BA.debugLine="ctxt.InitializeContext";
_ctxt.InitializeContext(ba);
//BA.debugLineNum = 451;BA.debugLine="Dim PackageManager As JavaObject = ctxt.RunMethod";
_packagemanager = new anywheresoftware.b4j.object.JavaObject();
_packagemanager = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(_ctxt.RunMethod("getPackageManager",(Object[])(__c.Null))));
//BA.debugLineNum = 452;BA.debugLine="Return PackageManager.RunMethod(\"canRequestPackag";
if (true) return BA.ObjectToBoolean(_packagemanager.RunMethod("canRequestPackageInstalls",(Object[])(__c.Null)));
//BA.debugLineNum = 453;BA.debugLine="End Sub";
return false;
}
This is line 1448 of activityhome.java
B4X:
@Override
public void resume(BA ba, Object[] result) throws Exception{
while (true) {
switch (state) {
case -1:
{
anywheresoftware.b4a.keywords.Common.ReturnFromResumableSub(this,null);return;}
case 0:
//C
this.state = 1;
//BA.debugLineNum = 746;BA.debugLine="If File.ExternalWritable = False Then";
if (true) break;
case 1:
//if
this.state = 10;
if (anywheresoftware.b4a.keywords.Common.File.getExternalWritable()==anywheresoftware.b4a.keywords.Common.False) {
this.state = 3;
}else if(parent.mostCurrent._phone.getSdkVersion()>=26 && parent.mostCurrent._apkupdt._canrequestpackageinstalls /*boolean*/ ()==anywheresoftware.b4a.keywords.Common.False) {
this.state = 5;
}else if(parent.mostCurrent._apkupdt._checknonmarketappsenabled /*boolean*/ ()==anywheresoftware.b4a.keywords.Common.False) {
this.state = 7;
}else {
this.state = 9;
}if (true) break;