8

This is a follow-up to "Open in browser" does nothing when Android app is set as default.

When I click a link to an SE site in the Android app, it gives me an "open with" pop-up that has two options:

  • Chrome
  • Stack Exchange

I can then choose to open SE posts like this "Just once" or "Always."

The problem is that when I set the SE app to "always," and I click "open in browser,"

Except, the app crashes when trying to open it in browser.

LogCat (just right after selecting "Open in browser")

01-22 18:03:36.354: E/AndroidRuntime(16064): FATAL EXCEPTION: main
01-22 18:03:36.354: E/AndroidRuntime(16064): Process: com.stackexchange.marvin, PID: 16064
01-22 18:03:36.354: E/AndroidRuntime(16064): java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.stackexchange.marvin.utils.Helpers.getNonMarvinViewIntent(Helpers.java:452)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.stackexchange.marvin.ui.question.QuestionDialog$1.onClick(QuestionDialog.java:39)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1108)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AdapterView.performItemClick(AdapterView.java:310)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AbsListView.performItemClick(AbsListView.java:1145)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3066)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AbsListView$3.run(AbsListView.java:3903)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.os.Handler.handleCallback(Handler.java:739)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.os.Handler.dispatchMessage(Handler.java:95)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.os.Looper.loop(Looper.java:148)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.app.ActivityThread.main(ActivityThread.java:5417)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at java.lang.reflect.Method.invoke(Native Method)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

I suspect it's related to how the Intent was created, but not sure.

Specs:

  • Device model: Nexus 5
  • Android version: Android 6.0.1
  • SE app version: 1.0.82 (beta)
  • Installed browser: Chrome 47.0.2526.83 (latest at current writing)
0

1 Answer 1

5

As a workaround, you can prevent the Android OS from automatically loading SE content in the Stack Exchange app. This will prevent the bug from being triggered. To do so, modify the Go to supported URLs setting as follows:

  1. In Android's Application Manager, select the Stack Exchange app
  2. Touch Set as default
  3. Touch Go to supported URLs
  4. Select Always Ask or In other app

Tested on Android Marshmallow

Unfortunately, employing this workaround sacrifices the ability to click any link that points to a Stack Exchange site and have it open in the app. With this setting enabled, you can still open a question in the SE app from the browser by touching the bar above the post that says Read this post in our app!:

enter image description here

Note: You must be viewing the mobile site to see this option.

If you would rather use your browser anyway, posts should show on the Mobile site which is easy to navigate. If you need to switch between the mobile and full sites, use the mobile and full site links at the bottom of the page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .