Can we use READ_PHONE_STATE?

My new client just ask me about app which reads phone state (call or free) and send it to Microsoft Lync. So if we have READ_PHONE_STATE maybe I can use it to build app for Android and iOS? [import]uid: 12704 topic_id: 30282 reply_id: 330282[/import]

In Corona, READ_PHONE_STATE is used to fetch the Android device’s unique phone ID assigned by the manufacturer. Is that what you are after? If so, you can fetch this ID as followings…
[lua]local deviceID = system.getInfo(“deviceID”)[/lua]

Note that if the Android device is not a phone, then Corona will fetch the unique ID assigned by the Android OS upon installation. That means the ID can possibly change if someone re-installs the Android OS or roots it.

Also note that Corona currently assigns the READ_PHONE_STATE permission to all Android apps by default. However, we do plan on removing this permission in the future, so I suggest that you add this permission to your “build.settings” file to help future proof it. You’ll want to do this as follows.
[lua]settings =
{
androidPermissions =
{
“android.permission.READ_PHONE_STATE”
}
}[/lua]
[import]uid: 32256 topic_id: 30282 reply_id: 121377[/import]

In Corona, READ_PHONE_STATE is used to fetch the Android device’s unique phone ID assigned by the manufacturer. Is that what you are after? If so, you can fetch this ID as followings…
[lua]local deviceID = system.getInfo(“deviceID”)[/lua]

Note that if the Android device is not a phone, then Corona will fetch the unique ID assigned by the Android OS upon installation. That means the ID can possibly change if someone re-installs the Android OS or roots it.

Also note that Corona currently assigns the READ_PHONE_STATE permission to all Android apps by default. However, we do plan on removing this permission in the future, so I suggest that you add this permission to your “build.settings” file to help future proof it. You’ll want to do this as follows.
[lua]settings =
{
androidPermissions =
{
“android.permission.READ_PHONE_STATE”
}
}[/lua]
[import]uid: 32256 topic_id: 30282 reply_id: 121377[/import]