问题
Using MIT App Inventor 2:
Is it possible to get some info from the phone to know who is it like:
- phone number or
- email address or
- IP address or
- device id or
- UUID or
- something else that I can use to identify that phone on my db?
I want to use some native component. (nothing like Identi or oauth)
回答1:
To get the IP address, you can use the web
component and an API, see also https://www.google.com/search?q=get+ip+address+api
See also How to work with the web component and an API by Stephen
To get phone number or email address or IP address or device id or UUID, blocks to do that are not available directly, but you could write your own extension and create a block yourself...
More information about how to create an extension see here, however that will be more advanced and will require some Java skills...
Alternatively you can take a look at some of my already available extensions
- Account Manager Extension to get some information about the user
- Telephony Manager Extension to get some information from the telephony manager.
The App Inventor Extensions are currently in testing. See the announcement for more information and read the App Inventor Extensions document about how to use an App Inventor Extension.
来源:https://stackoverflow.com/questions/37191105/get-unique-android-phone-identification-using-mit-app-inventor