-
-
Save es0329/b41089ed3994b903b2711b7c8b43588a to your computer and use it in GitHub Desktop.
Share .mp4 video to Instagram via Android Intent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> adb shell pm list packages -f | |
... | |
package:/data/app/com.instagram.android-2.apk=com.instagram.android | |
... | |
-> adb shell pm dump com.instagram.android | grep -A 1 MAIN | |
intent={act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x14008000 cmp=com.instagram.android/.activity.MainTabActivity} | |
realActivity=com.instagram.android/.activity.MainTabActivity | |
-- | |
android.intent.action.MAIN: | |
65143b78 com.instagram.android/.activity.MainTabActivity filter 64ff3d90 | |
-- | |
Action: "android.intent.action.MAIN" | |
Category: "android.intent.category.LAUNCHER" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> adb shell pm list packages -f | |
... | |
package:/data/app/com.instagram.android-1/base.apk=com.instagram.android | |
... | |
-> adb shell pm dump com.instagram.android | grep -A 1 MAIN | |
android.intent.action.MAIN: | |
3d2eec5 com.instagram.android/.activity.MainTabActivity filter 770faff | |
-- | |
Action: "android.intent.action.MAIN" | |
Category: "android.intent.category.LAUNCHER" | |
-- | |
privateFlags=[ HAS_DOMAIN_URLS ] | |
dataDir=/data/user/0/com.instagram.android |
Output from L15
Exception
E/ShareDialog: e.getLocalizedMessage >> file:///storage/emulated/0/870_90.mp4 exposed beyond app through ClipData.Item.getUri()
E/ShareDialog: e.getCause >> null
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following Instagram's video sharing Android Intent. Trivial edit to bypass a chooser and launch Instagram directly.
Kit Kat device works as intended, however Nougat device falls to
L20
, launching Play Store, as if Instagram isn't installed.On both devices
L14
of ShareDialog'sstartInstagram()
does present a chooser of video-sharing capable apps, including Instagram.Related code for sharing an image with this same approach works as intended on both devices.