I am creating a panic button, then the need is ... to get the phone´s Mac Adress in order to tell the users who pushed the button.
I wonder, is there a way to get the device´s mac address
If it is so... I would have my issue solved, then I can tell in the SMS that I will send, the phone number that activated it.
Tks in advance to all of you guys.
Estoy creando un boton de panico, y si pudiera obtener la direction Mac del telefono que lo presionó, yo podria identificarlo e informar a los usuarios del boton de panico, quien fue el queue lo activó. ¿Alguien sabe como poder obtener la MAC cuando see presione el boton?
Solo la instruction clave seria la gran solucion para mi.
Greetings to all of you y saludos a los amigos queue hablan español.
Actually Rafael, why would you need the phone's Mac Address, which is tied to the WiFi network? The User of your app can input their phone number or the App could use Taifun's telephony extension to get the phone number.
You can use App Inventor's Contact Picker such that the User can select which contacts an emergency SMS would be sent to. Be aware that if the App is to be distributed via Google Play, you cannot send an SMS directly, your App must instead pass the SMS to the phone's default Messenger - this is a recent Google Android Security Measure.
In order to create the panic button, I need no extra action from the user. Only push the button, and let actions do what they should do.
In this requirement, I am looking for the Phone´s Mac Adress in order to get an unic number that may tell the other panic user to get to know who pushed the button.
So the phone´s Mac Adress seems to be that unique number that I can compare, then let the user get to know who did get panic.
Tks a lot dear ChrisWard.
The Idea that you gave me "Taifun's telephony extension to get the phone number." is simpler and gave me an easier solution and I really appreciate your kind reply and motivational effort to help me out.
Hello ChrisWard
I was using the examples and the extension you told me to use, does not get my Phone number.
I have a dual-band Samsung phone.
So, do you have any other way to get the phone number?
Note: This is no guaranteed solution, because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. As workaround you always can use this solution.
Use the Extension - if no number found:
Use the work around - if no success
Ask the User to input the number.
This would be on installation, the very first time the App is started. Once the phone number is obtained, save it in a TinyDB for subsequent use of the App, but provide a facility for the User to edit, should the number change.
bonsoir Rafael je vous écris pour vous demandez si vous avez réussit a récupérer l'adresse mac d'un téléphone en cliquant sur un bouton. si oui bien vouloir m'envoyez le code source de l'application en question.
I am facing a similar issue, but have a problem with the Wifi extension from @Taifun
The mac address being returned by TaiFunWifi1.MacAddress is 02:00:00:00:00:00
In the phone status information the Phone Wi-Fi MAC Address is 3C:29:4E:a0:1B:16
Any suggestions to retrieve the correct Phone Wifi MAC would be welcome.
You can no longer get the hardware MAC address of a android device. WifiInfo.getMacAddress() and BluetoothAdapter.getAddress() methods will return 02:00:00:00:00:00. This restriction was introduced in Android 6.0.
There seems to be a workaround available, which still might work for some devices, see the comments here
@Taifun thank you for the information. My issue is that I need to save a configuration onto 100's of devices and the configuration files are different for each device. I need a way to ensure that the correct configuration is being applied to a particular device. Any ideas how can I identify the device ?