Android Question Get the apk name installed

xmaxmex

New Member
Hi,

i need to include a IP address in my APK name like, myb4app_192.168.0.250.apk.

My APK just need a IP config name to works on network, a zero app configuration.

How after install the APK, get the name of the APK an return a IP on his name?

Thanks in advance
 

sirjo66

Well-Known Member
Licensed User
Longtime User
I'm sorry, but I don't understand the really reason of it.
If you need to have a different configuration for each device, you can simply get the IP of the device and the use it for to make a call to server and so you can get the configuratione file from server
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
If you need to send the PackageName + IP Address info you can do it with something like this
B4X:
Dim myip As String = "xxx.xxx.xxx.xxx"    'Here you will assign the real IP Address detected by the running app
Log(Application.PackageName & "_" & myip)    'Return the PackageName of the app followed by the IP detected before
 
Upvote 0

sirjo66

Well-Known Member
Licensed User
Longtime User
Here is how to get IP address:
("ignore" is necessary for to ignore a warning message)
B4X:
Dim ssocket As ServerSocket 'ignore
Dim myip As String = ssocket.GetMyIP
Log(Application.PackageName & "_" & myip)    'Return the PackageName of the app followed by the IP detected before
 
Upvote 0

xmaxmex

New Member
Application.PackageNmae returns com.b4a.teste!

But i need the name myb4a_192.168.0.1.apk

And in this app i get the IP, this is a personalized IP on network, like a config VAR value!

Zero conf, and the app open a webview on this IP on config.

Any Help?
 
Upvote 0

xmaxmex

New Member
Here is how to get IP address:
("ignore" is necessary for to ignore a warning message)
B4X:
Dim ssocket As ServerSocket 'ignore
Dim myip As String = ssocket.GetMyIP
Log(Application.PackageName & "_" & myip)    'Return the PackageName of the app followed by the IP detected before
See...

Application.PackageNmae returns com.b4a.teste!

But i need the name myb4a_192.168.0.1.apk

And in this app i get the IP, this is a personalized IP on network, like a config VAR value!
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 1
Solution

Similar Threads

Replies
10
Views
5K
D
  • Article
Share My Creation APK-Installer
Replies
0
Views
3K
Deleted member 103
D
Top