Android Question Check the source where an app was installed from

Erel

Administrator
Staff member
Licensed 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

HAH

Well-Known Member
Licensed 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