Why can my Android app no longer receive incoming SMSs? -
i'm using sms verify phone number of user’s. application set receive incoming smss , has been working. now, running on device have telephony , sms being received device, i'm getting reports app no longer receiving , processing sms. idea going on?
there situations applications can't receive incoming smss. if app isn't running in primary user profile may not able receive smss. can happen when running in secondary user profile, restricted profile or managed profile (aka android work).
if using phone number user's primary identification don't want allow access in restricted profiles or secondary user profiles anyway, check restrictionsmanager usermanager.disallow_sms set disallowed in these circumstances.
usermanager um = (usermanager) getsystemservice(context.user_service); bundle restrictions = um.getuserrestrictions(); boolean disallowsms = restrictions.getboolean(usermanager.disallow_sms, false); however, managed profiles, user has personal , managed (work) profile on device, sms routed personal profile. if app in managed profile won't receive sms. in case want allow access still being used the primary user of device. having fallback method allow them read code sms , enter manually, or using phone call service can valid alternatives.
Comments
Post a Comment