B4A Tutorial Version safe APK installation - Erel    Oct 12, 2018   (35 reactions)   tags: apk install, B4A APK Installation, SDK, apk installation, b4a sdk, APK CanRequestPackageInstalls As Boolean Dim ctxt As JavaObject ctxt.InitializeContext Dim PackageManager As JavaObject = ctxt.RunMethod("getPackageManager", Null) Return PackageManager.RunMethod("canRequestPackageInstalls", Null) End Sub If not we open the relevant settings page... Msgbox_Result(Result As Int) Dim in As Intent in.Initialize("android.settings.MANAGE_UNKNOWN_APP_SOURCES", "package:" & Application.PackageName) StartActivity(in) https://www.b4x.com... B4A Question getPackageManager().getPackageInfo - kanaida (first post)    May 8, 2012 Thanks Erel.... B4A Question Find the default app of a particular type of intent - Inman    Dec 29, 2011 code to do that: Get Preferred/Default app on Android - Stack Overflow Intent i = (new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.google.com")); PackageManager pm = context.getPackageManager(); final ResolveInfo mInfo = pm.resolveActivity(i, 0); Toast.makeText(context, pm.getApplicationLabel(mInfo.activityInfo.applicationInfo), Toast.LENGTH_LONG).show(); I need to find the package name of the default app. Can someone please translate this code to B4A?... B4A Question How can I convert The following Java code To B4A code? Thanks - 269573820    Nov 13, 2024 Intent intent = this.getPackageManager().getLaunchIntentForPackage("com.tencent.mm");
intent.putExtra("LauncherUI.From.Scaner.Shortcut", true);
intent.setAction("android.intent.action.VIEW");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP... B4A Code Snippet Get the APK signature at runtime - Erel    Aug 30, 2016   (11 reactions) GetSignatureHash As String Dim jo As JavaObject jo.InitializeContext Dim signatures() As Object = jo.RunMethodJO("getPackageManager", Null).RunMethodJO("getPackageInfo", _ Array (Application.PackageName, 0x00000040)).GetField("signatures") Dim sig As JavaObject = signatures(0) Dim md As MessageDigest Dim hash() As Byte = md.GetMessageDigest(sig... B4A Example Check if the application is running on a Chromebook - Robert Valentino (first post)    Feb 13, 2023 Just tried your code and I get this error while compiling
return getPackageManager().hasSystemFeature(feature);
^
symbol: method getPackageManager()
So I did it this way and...
ChromeBook = jo.RunMethodJO("getPackageManager"... B4A Question Do you have a fold-able device? could you test this routine - Robert Valentino    Oct 19, 2023   (1 reaction) IsFoldable = jo.RunMethodJO("getPackageManager", Null).RunMethod... B4A Question How to get services infos - LucaMs    Mar 27, 2019 From Stackoverflow:
You can enumerate all packages and retrieve their services:
List<PackageInfo> pkgs = getPackageManager().getInstalledPackages(PackageManager.GET_SERVICES);
for(PackageInfo...<PackageInfo> is like VB.Net List Of() and pkgs is declared as this kind of List.
for(PackageInfo pkg : pkgs) is like b4a:
For Each pkg As PackageInfo In pkgs
... B4A Question is there a tool or manual SDK that can match as much JAVA code to B4A code as possible? - xiaoyao    Nov 13, 2024 : PackageManager= this.getPackageManager() in.Action=intent.setAction in.Flags =intent.setFlags Intent...(0x04000000, 0x10000000) Intent intent = this.getPackageManager().getLaunchIntentForPackage("com....FLAG_ACTIVITY_NEW_TASK); this.startActivity(intent); Dim pm As PackageManager Dim in As Intent = pm.GetApplicationIntent("com.tencent.mm") in.PutExtra("LauncherUI.From.Scaner.Shortcut... B4A Question QRCodeReaderView - problem in a device without camera - toby (first post)    Nov 16, 2024   (1 reaction) the B4XPagesManager object. The event name is B4XPage.
Sub CheckCamera As Boolean
Dim jo As JavaObject
jo.InitializeContext
Dim pm As JavaObject = jo.RunMethod("getPackageManager... Page: 1   2   3   4   5   6   7   |