I'm trying to use an Intent
to start an app for selecting a folder. I've looked at a lot of threads on this and I haven't found any with a solution other that those which have hardcoded references to specific apps like OI.
For example: Intent intent = new Intent("org.openintents.action.PICK_DIRECTORY");
I keep getting these errors probably because my emulator doesn't have the right app on it:
- //No Activity found to handle Intent { act=android.intent.action.PICK dat=directory:// }
- //No Activity found to handle Intent { act=android.intent.action.PICK dat=folder:// }
- //No Activity found to handle Intent { act=android.intent.action.PICK dat=content://vnd.google-apps.folder }
- //No Activity found to handle Intent { act=android.intent.action.PICK dat=file:///storage/emulated/0 }
- //No Activity found to handle Intent { act=android.intent.action.GET_CONTENT dat=file:///storage/emulated/0 }
I've found several sample apps that do return files or folders. I guess I'll grab one of them and rewrite it for my usage. I'd rather make the Intent
used to start it as generic as possible and not hardcode the name of my app.
What are the pairs of Intents
and intent-filters
which I need to add the code to allow connection between some app and my file/folder selector program?