function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dallas KuhnDallas Kuhn 

Why does the Salesforce1 app open after login to my native app

I have developed a native Android app that logs in to Salesforce. The issue I have is after I log in to my app Salesforce1 also opens up on its own and steals focus. I suspect this has something to do with a callbackURI of some sort. I have specified my own unique callbackURI in my app's boot config and also on the connected app on Salesforce. Anyone know what could be causing this and how I can prevent this happening?
Best Answer chosen by Dallas Kuhn
Dallas KuhnDallas Kuhn
Hi Andy, I logged a bug with regards to this issue and have received confirmation that this is a known bug with Salesforce1 and the MobileSDK. It will apparently be fixed in the next update.

Thanks to everyone who tried to assist me with this issue.

All Answers

Jaybh01Jaybh01
This happens at user lavel. In user record, there is a check box called "Salesforce1 User". If we turn it off, Salesforce1 will not open for that user.
Dallas KuhnDallas Kuhn
Unfortuntaly that does not help and Salesforce1 still opens after login and tapping the 'Allow' button.
Dallas KuhnDallas Kuhn
There is also a global setting 'Enable the Salesforce1 mobile browser app' under Mobile Admin > Salesforce1 which also does not fix the issue.
PratikPratik (Salesforce Developers) 
Hi Dallas,

It seems to be some andoid compatibility issue as you have already tried mentioned settings. Not all android devices are supported. Have you tried it on iOS. 

You can refer to this link:
https://help.salesforce.com/apex/HTViewSolution?urlname=Salesforce1-recommended-Android-devices&language=en_US

Thanks,
Pratik
Dallas KuhnDallas Kuhn
Thanks for the answer Pratik.

Just to confirm that this never used to happen, it has only started happening within the last month and our app has not changed so it must be a new feature in Salesforce or Salesforce1. I can also confirm that this is happening on multiple apps using different Salesforce instances. The issue is not that Salesforce1 doesnt work the issue is after i log in to salesforce using other native apps, Salesforce1 opens by itself and takes the focus, pushing the other app to the background. I can further confirm that this doesnt happen on iOS, only Android. I have tested on the following devices which all have the same behaviour:
- Samsung Galaxy S5 – Android 4.4.2
- Samsung Galaxy Note 2 – Android 4.4.2
- Samsung Galaxy Ace 3– Android 4.2.2

So its not a compatibility issue, the issue is that after logging in to Salesfore using a webview in any native Android app, Salesforce1 opens by itelf when we dont want it to. This happens even if I uncheck the 'Salesforce1 User' field on the User object and the 
'Enable the Salesforce1 mobile browser app' in Mobile Admin settings for Salesforce1. It seems the Android Salesforce1 app is not honoring that setting.
PratikPratik (Salesforce Developers) 
Hi Dallas,

As per your description, it seems to be some specific issue with android unsupported device,as it's working fine with iOS.

Thanks,
Pratik
Dallas KuhnDallas Kuhn
Hi Pratik, 

It is not an unsupported device. How can a Galaxy S5 be unsupported? This used to work on all of the devices i listed. It is a new thing that has started happening. Perhaps someone else has a solution to this. Is anyone from the Salesforce1 Android app dev team on this forum. This probably a new feature they implemented that is causing this issue. Furthermore if i try access the link to this forum post from my email on Android, it opens Salesforce1. 
PratikPratik (Salesforce Developers) 
Hi Dallas,

Samsung S5 is supported device.

In android devices, when you open any app for the first time, it gives you options of available apps with which you can open that app (only once or Always open). 
Checkout this:
http://www.guidingtech.com/13517/change-default-program-android-file-type-open/

Hope this will help!

Thanks,
Pratik
 
Dallas KuhnDallas Kuhn
Hi Pratik, Salesforce1 is not set as the default app.
AndyBeanAndyBean
Howdy Dallas:
I have pinged our Android developers on this issue to provide some insight because it is outside of my experience level. Can you provide more detail about how you are wrapping S1 adn the method you used, perhaps with screenshots to illustrate the issue?

- Andrew Bean
Senior UX and UI Designer at Salesforce


 
Dallas KuhnDallas Kuhn
Hi Andy, I logged a bug with regards to this issue and have received confirmation that this is a known bug with Salesforce1 and the MobileSDK. It will apparently be fixed in the next update.

Thanks to everyone who tried to assist me with this issue.
This was selected as the best answer