Hello GiuseppeGA
Thanks for the info. I dont really consider this a solution but more a “dirty workaround”. I do not really understand why anyone would solve it this way. I would think it is possible to aks the phones network state before initiating the autologin process. I guess all you do now is check if the connection has a swisscom 3g network ip to decide on the autologin.
Here is what i am talking about: http://viralpatel.net/blogs/android-internet-connection-status-network-change/
Permissions required to access network state:
<uses-permission android:name=“android.permission.ACCESS_NETWORK_STATE” />
Now check following utility class NetworkUtil. It has method getConnectivityStatus which returns an int constant depending on current network connection. If wifi is enabled, this method will return TYPE_WIFI. Similarly for mobile data network is returns TYPE_MOBILE. You got the idea!!
So something along these lines (yes its not real code):
IF (“IP = swisscom 3g network ip range” and "phone state = TYPE_MOBILE)
{
“Autologin”
}
else
{
“No Autologin”
}
For now atleast all users will be informed about the risks they take.
Kind regards
UdK.cH