ilan Expert Licensed User Longtime User Apr 3, 2016 #1 hi i want to use a java inline code from a class module or a code module but how do i do this? i put the javaobject in the codemodule and also the java inline code but when i try to run it i get an error that the java code was not found. when i run it from the main activity it is working error: java.lang.RuntimeException: Method: not matched. Last edited: Apr 3, 2016
hi i want to use a java inline code from a class module or a code module but how do i do this? i put the javaobject in the codemodule and also the java inline code but when i try to run it i get an error that the java code was not found. when i run it from the main activity it is working error: java.lang.RuntimeException: Method: not matched.
JordiCP Expert Licensed User Longtime User Apr 4, 2016 #21 Depending on your needs, Informatix gave the answer Informatix said: If you need the application context, you can get it directly in Java with BA.applicationContext. If you need the activity context, you have to pass it. Click to expand... Upvote 0
Depending on your needs, Informatix gave the answer Informatix said: If you need the application context, you can get it directly in Java with BA.applicationContext. If you need the activity context, you have to pass it. Click to expand...
ilan Expert Licensed User Longtime User Apr 4, 2016 #22 JordiCP said: Depending on your needs, Informatix gave the answer Click to expand... Yes but i dont understand how to get it directly??? I just call the code module and there it is using a java object to get a string from the java code that uses peckagrmenager https://www.b4x.com/android/forum/threads/app-downloaded-from-google-play-or-amazon-lib.65377/ Upvote 0
JordiCP said: Depending on your needs, Informatix gave the answer Click to expand... Yes but i dont understand how to get it directly??? I just call the code module and there it is using a java object to get a string from the java code that uses peckagrmenager https://www.b4x.com/android/forum/threads/app-downloaded-from-google-play-or-amazon-lib.65377/
Informatix Expert Licensed User Longtime User Apr 4, 2016 #23 ilan said: what i want to do is to get the result (boolean or string) from the codemodule that uses Content peckagemenager Click to expand... In Java: static PackageManager PM = BA.applicationContext.getPackageManager(); No need to pass anything. Upvote 0
ilan said: what i want to do is to get the result (boolean or string) from the codemodule that uses Content peckagemenager Click to expand... In Java: static PackageManager PM = BA.applicationContext.getPackageManager(); No need to pass anything.
ilan Expert Licensed User Longtime User Apr 4, 2016 #24 Oh i see i use b4a peckagemenage in the java code. Will try it out when i get home Thank you very much for your help Upvote 0
Oh i see i use b4a peckagemenage in the java code. Will try it out when i get home Thank you very much for your help
ilan Expert Licensed User Longtime User Apr 4, 2016 #25 Informatix said: In Java: static PackageManager PM = BA.applicationContext.getPackageManager(); No need to pass anything. Click to expand... thanks a lot @Informatix it is really working Upvote 0
Informatix said: In Java: static PackageManager PM = BA.applicationContext.getPackageManager(); No need to pass anything. Click to expand... thanks a lot @Informatix it is really working