k3b / intent-intercept

Android dev tool to view inter-app communication
Apache License 2.0
201 stars 20 forks source link

Resend ACTION-VIEW with DATA-https-URL does not work on android-7 #4

Closed TPS closed 3 years ago

TPS commented 6 years ago

@k3b I think this is https://github.com/intrications/intent-intercept/issues/42, but another instance:

When using Ff Klar/Focus (from https://f-droid.org/app/org.mozilla.klar, https://play.google.com/store/apps/details?id=org.mozilla.klar, or https://play.google.com/store/apps/details?id=org.mozilla.focus), if 1 uses "Open with…" from the ⋮ menu, it works perfectly when 1 chooses another browser, but if 1 chooses II (e.g., if 1 wants to edit the URL before opening elseplace), II's "Send Edited Intent" remains faded out, no matter whatever else I do. (The same bug is in the original II.)

Is there any other info I can provide?

OT: Are you interested in continuing to fix issues from https://github.com/intrications/intent-intercept/issues?

k3b commented 6 years ago

is the send button also faded out if you do not edit the url?

I assume that "faded out" means that no app matches the intent possible reasons:

Firefox does not work on my android-4.4 because it has not enough cpu-memory so i cannot test it myself.

please add to this ticket:

TPS commented 6 years ago

MATCHING ACTIVITIES: none

k3b commented 6 years ago

Interesting. This seems to be a android-7 permission issue because of FLAGS: none

Under android-4.4 i have FLAGS: FLAG_ACTIVITY_FORWARD_RESULT

If you add

launchFlags=0x13104000;
to the intent to manually set the FLAGS similar to my example below. Will this allow the re-send ? --- This is a similar intent from my android-4.4 device where re-send works for view https:.... It was generated from a app-launcher-bookmark from privacybrowser (com.stoutner.privacybrowser.standard)
intent://m.heise.de/newsticker/#Intent;scheme=https;action=android.intent.action.VIEW;launchFlags=0x13104000;sourceBounds=198%20630%20444%20848;end 
------------ 
ACTION: android.intent.action.VIEW 
DATA: https://m.heise.de/newsticker/ 
URI: intent://m.heise.de/newsticker/#Intent;scheme=https;action=android.intent.action.VIEW;launchFlags=0x13104000;sourceBounds=198%20630%20444%20848;end 
FLAGS: 
FLAG_ACTIVITY_FORWARD_RESULT 
FLAG_ACTIVITY_TASK_ON_HOME 
FLAG_ACTIVITY_PREVIOUS_IS_TOP 
FLAG_RECEIVER_FOREGROUND 
FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY 

------------ 
MATCHING ACTIVITIES: 
Browser (com.android.browser - com.android.browser.BrowserActivity) 
Chrome (com.android.chrome - com.google.android.apps.chrome.Main) 
Opera Mobile (com.opera.browser - com.opera.Opera) 
Privacy Browser (com.stoutner.privacybrowser.standard - com.stoutner.privacybrowser.activities.MainWebViewActivity) 
Intent Abfänger (de.k3b.android.intentintercept - uk.co.ashtonbrsc.intentexplode.Explode) 
==> Zip (de.k3b.android.toGoZip - de.k3b.android.toGoZip.Add2ZipActivity) 

k3b commented 6 years ago

No solution yet.

what i tried on android-7.1 using firefor-klar

no change :-(

TPS commented 6 years ago

Sorry for delay replying. I tried adding launchFlags=0x13104000 as mentioned. That populated FLAGS, but didn't cause any apps to be matched, as you said above.

TPS commented 6 years ago

@k3b What's interesting about this is that I don't replicate this w/ other browsers that also have an "Open with…" option, e.g., http://play.google.com/store/apps/details?id=com.cleanmaster.security, which has a Private Browsing option. When I use it to open II from this page, I get

intent://github.com/k3b/intent-intercept/issues/4#Intent;scheme=https;end 
------------ 
ACTION: android.intent.action.VIEW 
DATA: https://github.com/k3b/intent-intercept/issues/4 
URI: intent://github.com/k3b/intent-intercept/issues/4#Intent;scheme=https;end 
FLAGS: 
none 

------------ 
MATCHING ACTIVITIES: 
Safe Browsing (com.cleanmaster.security - ks.cm.antivirus.privatebrowsing.PrivateBrowsingActivity) 
Share URL (com.intrications.android.sharebrowser - com.intrications.android.sharebrowser.MainActivity) 
LastPass (com.lastpass.lpandroid - com.lastpass.lpandroid.activity.WebBrowserActivity) 
LastPass Beta (com.lastpass.lpandroid.beta - com.lastpass.lpandroid.activity.WebBrowserActivity) 
Firefox Klar (org.mozilla.klar - org.mozilla.focus.activity.MainActivity)

which works perfectly. I think the only difference I see is the package=de.k3b.android.intentintercept; portion of the URI/intent (that Klar has, but Private Browsing doesn't). Removing it manually doesn't seem to help, nor replacing it w/ the FLAGS option above, though. Still, I suppose this might be considered a bug in Klar (in that it sends that), but I figure it's probably a common-enough issue (e.g., probably all Ff browsers do this, if not other apps) that might be pretty easy to workaround, @ least as part of a solution.

k3b commented 6 years ago

I assume that intentintercept needs android-6-style dynamic internet permission for android-7 and later.

Mergerequests are welcome

TPS commented 6 years ago

I think no, because whenever I try the same sequence w/ any other browser (I use LastPass & Edge, also), it just works.…

k3b commented 3 years ago

Fixed in Version 4.0.0