Android Question Check the source where an app was installed from

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Sub GetInstallerPackageName As String
   Dim jo As JavaObject
   jo.InitializeContext
   jo = jo.RunMethod("getPackageManager", Null)
   Dim o As Object = jo.RunMethod("getInstallerPackageName", Array(Application.PackageName))
   If o = Null Then Return "N/A" Else Return o
End Sub
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Is this code suitable and not hackable for paid app, so it should not installed from other sources like copying ...
Or there is another and better scenario?
 
Upvote 0
Top