26
Nov
Screenshot_2013-11-26-06-58-25

One of the greatest features that sets Android apart from most of its mobile counterparts is the highly versatile sharing system that allows apps to declare themselves as targets for different types of media you might want to send from one app to another. All of this is accomplished with the familiar Sharing dialog, also known as the Chooser. Unfortunately, since people began using KitKat, a strange bug has turned up that may randomly cause your last chosen action to be reused automatically instead of allowing you to choose something different each time.

1148-38795-s6o6DG7F4zEWJyD-upload

Symptoms

The behavior is basically identical to choosing the 'Always' button along with an action, which automatically bypasses the chooser each time it would normally appear. The problem: it happens after you've pressed the 'Just Once' button or double-tapped an activity. Once the bug kicks in, it's basically stuck. This video demonstrates the the bug.

Causes

The first thing you should know, this bug seems to happen entirely at random. I've spent hours - literally - trying to reproduce it with different apps and different actions in several combinations, but I can't seem to do it. On the other hand, quite a few people have hit it almost immediately, including a few people on the AP team. So far, nobody has identified a specific pattern of actions that can trigger the bug, but it seems particularly common with YouTube and Chrome. However, those apps may just be more visible because people share from them more frequently.

Solutions and Workarounds

We've got a couple of ways to deal with this bug, but neither of them are perfect. The easiest option is to simply clear your app preferences. This can be done by going to Settings -> Apps -> menu (top right) -> Reset app preferences. Unfortunately, this method isn't without some drawbacks. To begin with, this will clear all of the default actions that were legitimately set on purpose, plus changes made to App Ops permissions, disabled notifications, and disabled apps. All of that is a bit annoying if you've changed anything, but it's worse when you consider that this isn't a permanent fix. This just fixes the problem until it comes back, which may never happen, or it could return almost immediately.

Screenshot_2013-11-26-11-58-49

For a longer lasting fix, there are 3rd-party replacements that stand in for the regular sharing dialog. Going with an alternate chooser may not be an ideal solution for everybody, but it should sidestep this bug until Google can provide a fix. The only app I've seen recommended is Andmade Share, but I've never used it and can't vouch for its quality.

Developers can get in on this, as well. It's possible to work around the issue in your apps with a few extra lines of code. The code used in this answer on StackOverflow will invoke the "Complete action with" dialog as long as there is no default app already set, which is precisely the behavior we want to see. Of course, this code won't be necessary once Google fixes the bug, but it wouldn't hurt to include it for your users if you already happen to have an update coming out.

Wrap-Up

Google has yet to acknowledge or respond to the AOSP Issue Tracker thread, but the bug certainly has drawn attention on a quite a few sites, so it probably won't be ignored. A non-Googler by the name of Keiji Ariyama has submitted a patch to AOSP that may be a suitable fix, but it's still awaiting review. Since this isn't a critical bug, we can probably expect a fix in the next OTA. Hopefully, the fixes described above will be suitable until the issue can be resolved more permanently.

Cody Toombs
Cody is a Software Engineer and Writer with a mildly overwhelming obsession with smartphones and the mobile world. If he’s been pulled away from the computer for any length of time, you might find him talking about cocktails and movies, sometimes resulting in the consumption of both.

  • http://pixel-shift.com/ Cristian Ruiz

    So it isn't just me! This has been driving me crazy the past couple days, and I wasn't sure how to solve it since "Share" isn't an app in the list. Should've checked the overflow menu. Hopefully this gets addressed soon.

  • Ivan

    I have the same problem with Note 3 4.3 ... When I am in twitter, and want to see picture in instagram it doesn't show me to choose Instagram as App to open with... I reinstalled twitter, instagram... Still same sh/t .. I need to open with Web browser and then it gives me the chance to choose Instagram.. So everytime I open instagram photo in twitter, it opens Browser and then Instagram... So anoying!

    • Tomáš Petrík

      That's different, it depends on what links the apps are set to open. It's not about the bug mentioned in this article.

      • Ivan

        Yeah I know, just decided to share it :-))) If someone knows how to solve this problem, please tell me :-))

        • Tomáš Petrík

          How to solve it - developers would need to change the behaviour of their apps.

    • Nacho

      That is because twitter app is unable to recognize the link as part of instagram, the same thing happen when you try to open youtube videos from twitter, first browser then youtube

  • Jeppe Foldager

    I had this on first time flashing 4.4. Now, after a second flash of the full kitkat, including recent small extra KitKat update, it is gone for good..

  • GuidZilla

    Was wondering what the hell was up when my N5 suspiciously only allowed me to share anything to G+.

    • gtg465x

      At Google, they wouldn't necessarily call that a bug.

  • nath

    Yep. It's driving me mental.

    My 'Pocket is full of misguided shared items.

    • http://www.modminecraft.com/ Nick Coad

      Haha in my case it was Keep that was gathering them all, but I know exactly what you mean!

    • ginobili1

      With me its Gmail... but I didn't press Send so all of them are just discarded emails! >:(

  • Guillaume

    I was affected by this

  • polo421

    Andmade shares is AWESOME! You can hide certain apps and sort the list however you want.

    • Cerberus_tm

      I don't have a Nexus 5, but this article made me install Andmade, and it is great! Message to all applications and websites: a single column of items is much easier to manage for users/readers than several columns!

  • Simon Belmont

    Whoa. I've been using KitKat with my Nexus 5 for over two weeks now and haven't run into this one, yet.

    That sounds really annoying. Thanks for the heads up, AP.

    • http://www.androidpolice.com/ Artem Russakovskii

      I ran into it on my first day with the N5. :(

  • guest

    I'm glad I'm not the only one! I have this issue with YouTube. Bugged the hell out of me until I found out about the work around. Even though this work around exists, this needs to be fixed asap.

  • Gav456

    I had this, sharing from chrome. Kik was set to "default" although chrome swore no default was set. Cleared cache+ data from both apps, nothing. Uninstalled and reinstalled kik - fix. No bother since.

  • http://www.dastardlyreport.com/ Ryan Joseph

    So glad I'm not the only one. This one was driving me nuts. The reset all preferences fix worked for me and I haven't seen it come back...yet.

  • Roy Riddex

    The problem I'm having with the share menu is when Skype keeps popping up as an option to make calls, even though I've set the dialer to 'always'

  • Felipe Lucena

    I had this bug, YouTube only let me share to dropbox. The solution I found at the time was to unninstal then reinstall dropbbox. This can be very annoying if it starts happening often.

  • http://www.zone38.net/ codeman38

    Looks like this bug explains the weird behavior I was seeing in various "share to a different browser" apps (Flashify, etc.), where I never actually had the ability to choose a browser. Good to know this wasn't an intentional change...

  • whispy_snippet

    Haven't experienced it yet fortunately. I've had my N5 for a couple of weeks although my 2013 N7 only received KitKat this morning.

  • carl

    couldn't this be fixed with a temporary xposed module ?

  • Bassam

    I want to also acknowledge that I too encountered this bug. It was with youtube and copy to clipboard

  • http://www.twitter.com/joshuaworth Joshua Worth

    Yeah I was only able to share screenshots to Google+

    • Seth Merritt

      Same here

  • Albert H

    OK, so I wasn't terribly delusional. Opening video files in a text editor, woo! (And no amount of uninstalling/clearing/etc. seems to help.)

    From my haphazard guessing, it looks like Google's upgrade corrupted some internal system data, and people who have been doing fresh installs + app restore mitigate this problem. If not that, it could be that some race condition is causing problems when things are getting setup. Whatever it is, Google's probably freaking out.

    This is the fresh install guide I found on another page:
    http://www.androidpolice.com/2013/11/25/bug-watch-nexus-4-kitkat-ota-krt16s-causing-bizarre-home-button-and-quick-settings-issues/#comment-1138585137

  • Alberto

    It happened to me: every time I tried to share a website in Chrome it opened up Google Keep. I "fixed" it by clearing Keep's preset values.

  • George Bakos

    It happened to me too. It set Default share to Facebook. I solved it by uninstalling and reinstalling the fb app

  • Luis Barahona

    yeah the bug has happened to me multiple times

  • Jon

    Why they keep bugging something that already worked?

  • http://www.modminecraft.com/ Nick Coad

    Oh man, I Googled for this a while back and saw so few results that I was worried I had personally stuffed something up and it wasn't really a bug. This was only a couple of days after the Nexus 5 came out though so I guess that explains the lack of info at the time.

    So glad it's a genuine bug that's getting exposure, should lead to a swift fix. And thanks for the reset preferences suggestion, it fixed it for me.

  • DanielM

    I have an opposite situation. When I have Chrome and Chrome beta installed in Kitkat, and chose Chrome beta as the default when clicking a link in Google Now, it will ask me again next time. Anyone is suffering the same?

  • C-Law

    This has yet to happen to me. Vzw Moto x on 4.4 for a little over a week

  • http://www.LOVEanon.org/ Michael Oghia (Ogie)

    Man, what's going on with all these bugs with Kitkat? Was it this buggy when Jelly Bean was released??

    • http://www.androidpolice.com/author/cody-toombs/ Cody Toombs

      Actually, it was worse. Perhaps the weird OTA-related bugs are worse this time around, like the home button thing and the full-disk encryption conversion. But overall, 4.3 and 4.2 were really bug laden in their first releases, prior to a few build OTAs and eventual 0.0.1 updates. The thing is, most people only ever stumble onto one or two bugs on their own, and may not have even realized they were affected by some of them. Further, a lot of the bugs turning up in 4.4 are more immediately visible to users while some of the stuff in 4.3 was very difficult to identify unless you knew what you were looking for.

      After I covered a few bugs on 4.3, we saw how helpful these articles were and decided to start a series. Of course, with more of these posts, it also looks like there are more bugs. In reality, readers now know about more bugs than would have ever heard of before. It's a bit unfair to the great work being done by the Android team, but it's a difficult to explain an issue while trying not to put unjust negative attention on the developers.

      Things really aren't worse, they are just more visible than ever.

      • http://www.LOVEanon.org/ Michael Oghia (Ogie)

        Good morning Cody, fair enough man. I probably tinged my comment with a bit of sarcasm at best and condescension at worse, but I really was curious. I think that's a great take on it. Thanks for that!

        • http://www.androidpolice.com/author/cody-toombs/ Cody Toombs

          Oh yeah, I didn't think you were completely serious, but I thought I would take advantage of the opportunity to add those points. A lot of people are making the same comment, and they totally believe it and are very angry at Google.

          • http://www.LOVEanon.org/ Michael Oghia (Ogie)

            Well then, I just hope some patches can be issued in the upcoming weeks or after the holidays

  • Brijesh

    I thought its just me .. Lets hope it will be fixed soon

  • LE Sacks

    I 'noticed' this this morning: Guardian newspaper app, Nexus 7, only offered my gMail sharing... I assumed I'd hit the 'always' option by mistake.... apparently not.

  • sfumatoxxx

    AP should modify the heading with Keiji's patch and yes, I know it has been mentioned in the article body. But on the bug, that fix is a spot-on. It's just a placement issue of mLastSelected variable in the condition code block of ResolverActivity.java. Just as he mentioned.

    • http://www.androidpolice.com/author/cody-toombs/ Cody Toombs

      Keiji has submitted patches that have been accepted in the past, which is a good sign, but it doesn't mean the issue hasn't already been fixed internally or that there aren't already bigger changes to that segment of code. I'm not questioning the quality of the patch or reasoning for why it fixes the bug, but we can't be certain that it will be accepted. For now, it's worth mentioning and giving credit for the trouble it took to look into the code, but it may not become a part of the final fix.

      • sfumatoxxx

        fair enough.

    • Björn Lundén

      Have you actually tried the "fix" in question? It breaks sharing completely instead, at least in Chrome.

  • G van Weelden

    I had this problem, it instantly wanted to share with Google Keep. But instead of deleting all app preferences I just deleted the ones from Google Keep and the problem has gone away. All works fine for now...

  • jp2592

    I'm having this issue on my Nexus 7 2013 with Kitkat. Have to reset app preferences all the time. Annoying. I did try the sharemade app mention above but didnt like it as the apps list was too small for my taste. I hope they fix it soon,

  • Halin

    Never happened to my Nexus 5.

  • Phill_S

    I have managed to reproduce this bug by sharing from Google Keep and that is the only time I have had it show up for me.

    What seems to be happening is Keep is overriding the sharing menu on other google apps, but not itself, even if you only tap to share that method once. When you share from Keep using a different method it then writes over the bug with the new share option - you can clear the app preferences as said above to clear it entirely, but it seems that Keep is the app causing all the problems.

  • jp2592

    I got so annoyed by having to constantly reset my app preferences and was about to restore back to 4.3 but then I saw another post stating that what they did was they deleted the app that it was default sharing to, (in my case it was facebook) and just reinstalled it. That for sure reset the sharing menu and allowed me to again see all the available sharing options but so far I have not seen the bug again. Its been 4 days so far and when I was just resetting the app preferences, the bug would come out everytime I shared a few times. Weird

  • Dtrieb

    Same here!

    I use https://play.google.com/store/apps/details?id=jp.co.noxi.apppicker instead of Andmade Share!

  • http://www.zone38.net/ codeman38

    Already commented about this on the 4.4.1 thread, but... this bug is fixed in 4.4.1.

    34d41e9: Only simulate the first click if "Always use" button is available

  • Mallik K

    Yeah me too getting this issue.

  • ginobili1

    Good suggestion for Andmade. Didn't know there was such a tool as well! Android is truly fully customizable. Works like a charm. Hope that this gets fixed sooner.

    P.S.: Wish that Andmade was more regularly updated, last update was in Jan, Since then we have had a couple of Android updates already. Will think whether to buy or not.

  • Kiamat

    FYI this is happening to me with the KitKat update to my HTC One Developer Edition. It defaults to FB in all cases. The only permanent fix I've found is to disable the FB app.

  • http://goresult.in/ Prachi Sharma

    Good article. I see you have some comments that disagree with your observations and conclusions.

    http://goresult.in/

    While I can appreciate where these folks are coming from, I think their comments serve to bolster your case. Folks here are here because this is where folks who are tech savvy come….odd places and blogs on the internet. And they are vocal with their points (and not too polite, as well.)

  • DJ SPY

    I didn't have this problem until I installed soundcloud. Whatever I choose to share week soundcloud it drugs sets that as the default for everything.