android Programming Glossary: viewintent
How to make an intent with multiple actions http://stackoverflow.com/questions/11021021/how-to-make-an-intent-with-multiple-actions a partial solution by using EXTRA_INITIAL_INTENTS Intent viewIntent new Intent Intent.ACTION_VIEW Intent editIntent new Intent Intent.ACTION_EDIT.. Intent editIntent new Intent Intent.ACTION_EDIT viewIntent.setDataAndType uri type editIntent.setDataAndType uri type Intent.. Intent.EXTRA_INITIAL_INTENTS new Intent viewIntent startActivity chooserIntent I say partial because if an app..
Invoking Adobe Reader from within my Android application http://stackoverflow.com/questions/5113435/invoking-adobe-reader-from-within-my-android-application code private void openFile File f String mimeType Intent viewIntent new Intent viewIntent.setAction Intent.ACTION_VIEW viewIntent.setDataAndType.. File f String mimeType Intent viewIntent new Intent viewIntent.setAction Intent.ACTION_VIEW viewIntent.setDataAndType Uri.fromFile.. new Intent viewIntent.setAction Intent.ACTION_VIEW viewIntent.setDataAndType Uri.fromFile file mimeType using the packagemanager..
How to make an intent with multiple actions http://stackoverflow.com/questions/11021021/how-to-make-an-intent-with-multiple-actions android intent share improve this question I found a partial solution by using EXTRA_INITIAL_INTENTS Intent viewIntent new Intent Intent.ACTION_VIEW Intent editIntent new Intent Intent.ACTION_EDIT viewIntent.setDataAndType uri type editIntent.setDataAndType.. EXTRA_INITIAL_INTENTS Intent viewIntent new Intent Intent.ACTION_VIEW Intent editIntent new Intent Intent.ACTION_EDIT viewIntent.setDataAndType uri type editIntent.setDataAndType uri type Intent chooserIntent Intent.createChooser editIntent Open in..... Intent.createChooser editIntent Open in... chooserIntent.putExtra Intent.EXTRA_INITIAL_INTENTS new Intent viewIntent startActivity chooserIntent I say partial because if an app supports both ACTION_VIEW and ACTION_EDIT it will show up twice..
Invoking Adobe Reader from within my Android application http://stackoverflow.com/questions/5113435/invoking-adobe-reader-from-within-my-android-application it opens. For your reference you'd do that with the following code private void openFile File f String mimeType Intent viewIntent new Intent viewIntent.setAction Intent.ACTION_VIEW viewIntent.setDataAndType Uri.fromFile file mimeType using the packagemanager.. you'd do that with the following code private void openFile File f String mimeType Intent viewIntent new Intent viewIntent.setAction Intent.ACTION_VIEW viewIntent.setDataAndType Uri.fromFile file mimeType using the packagemanager to query is faster.. code private void openFile File f String mimeType Intent viewIntent new Intent viewIntent.setAction Intent.ACTION_VIEW viewIntent.setDataAndType Uri.fromFile file mimeType using the packagemanager to query is faster than trying startActivity and catching..
|