Matt S. Member Licensed User Apr 12, 2024 #1 Hi everybody! There is "Application.PackageName" in B4A to get the PackageName. What is its equivalent in B4i?
Hi everybody! There is "Application.PackageName" in B4A to get the PackageName. What is its equivalent in B4i?
mcqueccu Well-Known Member Licensed User Longtime User Apr 12, 2024 #2 B4X: Sub GetPackageName As String Dim bundle As NativeObject bundle = bundle.Initialize("NSBundle").RunMethod("mainBundle", Null) Dim bundleIdentifier As String = bundle.GetField("bundleIdentifier").AsString Return bundleIdentifier End Sub Upvote 1
B4X: Sub GetPackageName As String Dim bundle As NativeObject bundle = bundle.Initialize("NSBundle").RunMethod("mainBundle", Null) Dim bundleIdentifier As String = bundle.GetField("bundleIdentifier").AsString Return bundleIdentifier End Sub