M-CAP7AIN Member Jun 15, 2021 #1 Hi ,I need change this section of code before compiling , this section generated with IDE. B4X: public static void initializeProcessGlobals() { try { Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null); } catch (Exception e) { throw new RuntimeException(e); } } To B4X: Class.forName("CLASS.NAME" + ".Main" .... I think this section give current class package name , application package name for this section not true?. Thanks.
Hi ,I need change this section of code before compiling , this section generated with IDE. B4X: public static void initializeProcessGlobals() { try { Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null); } catch (Exception e) { throw new RuntimeException(e); } } To B4X: Class.forName("CLASS.NAME" + ".Main" .... I think this section give current class package name , application package name for this section not true?. Thanks.
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2021 #2 I don't know what you are trying to do, but you don't need to change this. Better to start a new thread and explain the problem you are trying to solve. Upvote 0
I don't know what you are trying to do, but you don't need to change this. Better to start a new thread and explain the problem you are trying to solve.
M-CAP7AIN Member Jun 16, 2021 #3 i changed AndroidManifest.xml package manually: AndroidManifest.xml -> manifest -> package="XX.YY" AndroidManifest.xml -> manifest -> application -> android:name="ZZ.CC" Click to expand... when StartActivity with intent , this section: Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null); Click to expand... return "XX.YY" package instead of "ZZ.CC" classname. i find this section at (L*gic.*ll).[Reverse Engineering]? Upvote 0
i changed AndroidManifest.xml package manually: AndroidManifest.xml -> manifest -> package="XX.YY" AndroidManifest.xml -> manifest -> application -> android:name="ZZ.CC" Click to expand... when StartActivity with intent , this section: Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null); Click to expand... return "XX.YY" package instead of "ZZ.CC" classname. i find this section at (L*gic.*ll).[Reverse Engineering]?
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2021 #4 M-CAP7AIN said: i changed AndroidManifest.xml package manually: Click to expand... Big mistake and not needed. I don't know what you are trying to do, but you don't need to change this. Better to start a new thread and explain the problem you are trying to solve. Upvote 0
M-CAP7AIN said: i changed AndroidManifest.xml package manually: Click to expand... Big mistake and not needed. I don't know what you are trying to do, but you don't need to change this. Better to start a new thread and explain the problem you are trying to solve.