android-implicit-intent

Implementing a File Picker in Android and copying the selected file to another location

无人久伴 提交于 2019-11-27 13:46:35
问题 I'm trying to implement a File Picker in my Android project. What I've been able to do so far is : Intent chooseFile; Intent intent; chooseFile = new Intent(Intent.ACTION_GET_CONTENT); chooseFile.setType("*/*"); intent = Intent.createChooser(chooseFile, "Choose a file"); startActivityForResult(intent, PICKFILE_RESULT_CODE); And then in my onActivityResult() switch(requestCode){ case PICKFILE_RESULT_CODE: if(resultCode==-1){ Uri uri = data.getData(); String filePath = uri.getPath(); Toast

What is the different between Explicit and implicit activity call in android?

微笑、不失礼 提交于 2019-11-27 06:58:09
What is the difference between explicit and implicit activity call in android? If you explain the answer with a simple example will be good. MichaelP For example: implicit activity call In intent filter you create action for you activity, so other app can call your activity via this action as following: <activity android:name=".BrowserActivitiy" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="http"/> </intent-filter> </activity> And the other way to call

What is the different between Explicit and implicit activity call in android?

妖精的绣舞 提交于 2019-11-26 12:58:45
问题 What is the difference between explicit and implicit activity call in android? If you explain the answer with a simple example will be good. 回答1: For example: implicit activity call In intent filter you create action for you activity, so other app can call your activity via this action as following: <activity android:name=".BrowserActivitiy" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category

How to make a phone call using intent in Android?

回眸只為那壹抹淺笑 提交于 2019-11-26 00:23:37
问题 I\'m using the following code to make a call in Android but it is giving me security exception please help. posted_by = \"111-333-222-4\"; String uri = \"tel:\" + posted_by.trim() ; Intent intent = new Intent(Intent.ACTION_CALL); intent.setData(Uri.parse(uri)); startActivity(intent); permissions <uses-permission android:name=\"android.permission.CALL_PHONE\" /> Exception 11-25 14:47:01.661: ERROR/AndroidRuntime(302): Uncaught handler: thread main exiting due to uncaught exception 11-25 14:47