4
Intent share = new Intent(Intent.ACTION_SEND);
            if(isVideo()){
                share.setType("video/*");
            } else {
                share.setType("image/*");
            }

            share.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(fileName)));

            Context context = getContext();
            context.startActivity(Intent.createChooser(share, context.getString(R.string.share_via)));

The code above just crashes on Galaxy S. I am looking into logcat, the only thing I am seeing is this:

2018-10-22 15:00:30.582 1447-1514/? W/ActivityManager: Activity pause timeout for ActivityRecord{c5eef5f u0 com.app/.Activity t134}
2018-10-22 15:00:30.599 12453-12453/? W/ChooserActivity: Bixby supports pkg=null
2018-10-22 15:00:30.604 12453-12453/? W/ResolverActivity: mLaunchedFromPackage = com.app
2018-10-22 15:00:30.605 12453-12453/? W/SShareCommon: getQuickConnectSupportState - oneconnect isn't installed
2018-10-22 15:00:30.605 12453-12453/? W/System.err: android.content.pm.PackageManager$NameNotFoundException: com.samsung.android.oneconnect
2018-10-22 15:00:30.605 12453-12453/? W/System.err:     at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:288)
2018-10-22 15:00:30.605 12453-12453/? W/System.err:     at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:259)
2018-10-22 15:00:30.605 12453-12453/? W/System.err:     at com.samsung.android.share.SShareCommon.getSamsungConnectVersion(SShareCommon.java:535)
2018-10-22 15:00:30.605 12453-12453/? W/System.err:     at com.samsung.android.share.SShareCommon.checkSamsungConnectInfo(SShareCommon.java:529)
2018-10-22 15:00:30.605 12453-12453/? W/System.err:     at com.samsung.android.share.SShareCommon.<init>(SShareCommon.java:98)
2018-10-22 15:00:30.605 12453-12453/? W/System.err:     at com.android.internal.app.ResolverActivity.configureContentView(ResolverActivity.java:1283)
2018-10-22 15:00:30.606 12453-12453/? W/System.err:     at com.android.internal.app.ResolverActivity.onCreate(ResolverActivity.java:446)
2018-10-22 15:00:30.606 12453-12453/? W/System.err:     at com.android.internal.app.ChooserActivity.onCreate(ChooserActivity.java:333)
2018-10-22 15:00:30.606 12453-12453/? W/System.err:     at android.app.Activity.performCreate(Activity.java:7183)

the thing is, I am not even using one connect. I am just trying to bring up the standard android sharing screen where the user can pick an app he wants to share to. this is weird. any hints? has anyone ever noticed something like this?

TatiOverflow
  • 1,071
  • 2
  • 16
  • 23
  • That error is saying that this app is not installed: https://play.google.com/store/apps/details?id=com.samsung.android.oneconnect – Alejandro Cumpa Oct 22 '18 at 22:13
  • but i am not using that app. I am just trying to bring up the share dialog on android. the standard one that lists apps that you can share to. i do not intent to use one connect. basically, I am trying to launch "Intent share = new Intent(Intent.ACTION_SEND);". should that require extra apps? – TatiOverflow Oct 22 '18 at 22:17
  • Have you ever set that app as a default of that Intent ? – Alejandro Cumpa Oct 22 '18 at 22:25
  • if anyone did it, it would be samsung. not me. but then there would be crashes left and right. it's weired because all i want is to bring up the dialog. instead, i get a crash. how do i check the default handler for that intent? – TatiOverflow Oct 22 '18 at 22:29
  • 1
    Other devices actually work. – TatiOverflow Oct 22 '18 at 22:39
  • 1
    so, it appears, that, when there is only 1 intent that can handle that action, that intent is automatically launched, bypassing the dialog. is there a way to force a dialog to show even if only 1 intent exists? – TatiOverflow Oct 22 '18 at 22:40
  • 1
    found the issue. it's to do with api 28. – TatiOverflow Oct 22 '18 at 23:51

0 Answers0