1

I am designing a chat application with registered phone number for both iOS and android app.

I want to make sure that this number and app works on one phone at a time, as below scenarios given I want to make sure that app once authenticated to another device with same account details disable the previous device.

1) app installed on one iOS device registered account and deleted and reinstalled on same device again 2) app installed on iOS phone then same account is validated on android app the iOS phone app should show disabled account 3) app installed on two android phone with same number should disable old one automatically.

Reason is I don't want multiple copies of application with same number running to avoid like whatsapp does.

I am thinking of device keychain for iOS and android Mac Id usage to get this worked out since apple stopped UDID broadcasting to server. Also have a vague Idea about this vendor id apple providing.

Can anyone advice on this. How can I achieve so app is running with same account on one phone only and other just stops.

codelover
  • 1,113
  • 10
  • 28

2 Answers2

1

If you are binding an app with a phone number getting registered then it can run only on one device since you can't have same ph number running on 1+ devices at the same time. From user's perspective if he is changing same number between multiple handsets, going by your case, this app is blocking previous device of user, it sounds like a never ending loop. Everytime user's previous device is getting blocked or it may result in blocking all user's device. Dosen't make sense to me at least.

justLearning
  • 299
  • 2
  • 7
  • 1
    Thanks @justlearning my issue is that our app can be registered if this second device supports internet and can register the same number and verify it with the SMS send on the first phone or SIM Card that is shifted in this second phone. We just want to make sure that the first phone is resetting the application if the user authorises to use the 2nd device and informed that his first device will not be usable anymore. – codelover Sep 18 '15 at 08:53
  • 1
    Look for example like Viber , it can allow one phone, one iPad and one computer but as soon as we try to register the viber app on second phone the previous one automatically stops working. We thought about an approach to let server maintain the Device Type & ID (assigned and stored in keychain) against the number and then on every launch on app this ID is validated against the server. – codelover Sep 18 '15 at 08:56
  • 1
    If the server gets registration call from another phone then it just overwrites the previous device ID with this new one so next time the first device checks and automatically redirects him to login screen by force. We will however ensure the user that if user is coming from login process on second device we throw a prompt to user his first device will not be usable. Is this approach correct. – codelover Sep 18 '15 at 08:58
-1

Below method is for getting device ID

public static String getDeviceID(Context p_context) throws Throwable
{
    String m_deviceID = null;
    TelephonyManager m_telephonyManager = null;
    m_telephonyManager = (TelephonyManager) p_context
            .getSystemService(Context.TELEPHONY_SERVICE);

    m_deviceID = m_telephonyManager.getDeviceId().toString();

    if (m_deviceID == null || "00000000000000".equalsIgnoreCase(m_deviceID))
    {
        m_deviceID = "AAAAAAA";
    }

    return m_deviceID;
}

More information about the identification you can read here.

Community
  • 1
  • 1
user2413972
  • 1,355
  • 2
  • 9
  • 25