Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app crash when exporting alarms #612

Closed
islam2hamy opened this issue Jul 16, 2022 · 2 comments · Fixed by #616
Closed

app crash when exporting alarms #612

islam2hamy opened this issue Jul 16, 2022 · 2 comments · Fixed by #616
Milestone

Comments

@islam2hamy
Copy link

islam2hamy commented Jul 16, 2022

FATAL EXCEPTION: main
Process: com.forrestguice.suntimeswidget, PID: 3861
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=text/plain flg=0x42 (has extras) }
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1816)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1525)
	at android.app.Activity.startActivityForResult(Activity.java:4398)
	at android.support.v4.app.BaseFragmentActivityJB.startActivityForResult(BaseFragmentActivityJB.java:50)
	at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:79)
	at android.support.v4.app.ActivityCompatJB.startActivityForResult(ActivityCompatJB.java:30)
	at android.support.v4.app.ActivityCompat.startActivityForResult(ActivityCompat.java:146)
	at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:937)
	at android.support.v4.app.FragmentActivity$HostCallbacks.onStartActivityFromFragment(FragmentActivity.java:1047)
	at android.support.v4.app.Fragment.startActivityForResult(Fragment.java:963)
	at android.support.v4.app.Fragment.startActivityForResult(Fragment.java:952)
	at com.forrestguice.suntimeswidget.alarmclock.ui.AlarmListDialog.exportAlarms(AlarmListDialog.java:519)
	at com.forrestguice.suntimeswidget.alarmclock.ui.AlarmListDialog.onOptionsItemSelected(AlarmListDialog.java:264)
	at android.support.v4.app.Fragment.performOptionsItemSelected(Fragment.java:2379)
	at android.support.v4.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:3133)
	at android.support.v4.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:344)
	at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:414)
	at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:195)
	at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:113)
	at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:113)
	at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:69)
	at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:206)
	at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:776)
	at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
	at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
	at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969)
	at android.support.v7.view.menu.MenuPopup.onItemClick(MenuPopup.java:127)
	at android.widget.AdapterView.performItemClick(AdapterView.java:310)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1170)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3148)
	at android.widget.AbsListView$3.run(AbsListView.java:4063)
	at android.os.Handler.handleCallback(Handler.java:754)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:163)
	at android.app.ActivityThread.main(ActivityThread.java:6238)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
@islam2hamy
Copy link
Author

islam2hamy commented Jul 16, 2022

com.android.documentsui is disabeld
me.zhanghai.android.files is installed

( https://github.com/zhanghai/MaterialFiles )

@forrestguice
Copy link
Owner

Thanks for the report. It seems its not supported by MaterialFiles (issue 153).

I had assumed CREATE_DOCUMENT could always be resolved, but if its not available, I think the best we can do is fallback to ACTION_SEND and avoid the crash.

forrestguice added a commit that referenced this issue Jul 19, 2022
catch ActivityNotFoundException and fallback to legacy export (#612)
@forrestguice forrestguice added this to the v0.14.7 milestone Jul 19, 2022
@forrestguice forrestguice changed the title Alarm export app crash when exporting alarms Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants