[問題] 傳sdcard中的影像檔案給要求的app (非播放影像)
各位大大好
我在自己的app中儲存影像檔案在sdcard中 (於特定目錄)
在其它app想要獲取我app的影像檔案的時候
這部分我要如何傳給其它app呢?
我參考網路上寫了一些,但是試了數天都沒成功QQ
目前進度:
目前 manifest 中:
<activity
android:name=".VideoSelectionActivity"
android:label="@string/app_name" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="video/*" />
</intent-filter>
</activity>
然後在 VideoSelectionActivity的 onResume 程式碼
Intent intent = new Intent();
intent.setData(Uri.parse("sdcard/my app/videos/video001.mp4"));
setResult(Activity.RESULT_OK, intent);
finish();
我參考的網址: http://stackoverflow.com/questions/11933984
請問是哪邊出了問題呢?
謝謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.21.125.247
※ 文章網址: http://www.ptt.cc/bbs/AndroidDev/M.1399006590.A.655.html
推
05/02 15:01, , 1F
05/02 15:01, 1F
→
05/02 15:04, , 2F
05/02 15:04, 2F
推
05/02 15:05, , 3F
05/02 15:05, 3F
→
05/02 15:05, , 4F
05/02 15:05, 4F
→
05/02 15:06, , 5F
05/02 15:06, 5F
→
05/02 15:08, , 6F
05/02 15:08, 6F
我想完成的事情是如照片中所敘述
step 1: http://ppt.cc/uM2Y
step 2: http://ppt.cc/p~fh
step 3: http://ppt.cc/rno0
我想要實現的就是step 2中的 VideoPlayer 那種分享檔案給Line的功能
※ 編輯: issuemylove (211.21.125.247), 05/02/2014 15:19:56
→
05/02 15:20, , 7F
05/02 15:20, 7F
→
05/02 15:20, , 8F
05/02 15:20, 8F
※ 編輯: issuemylove (211.21.125.247), 05/02/2014 15:21:46
→
05/03 00:09, , 9F
05/03 00:09, 9F
推
05/03 09:32, , 10F
05/03 09:32, 10F
→
05/03 09:33, , 11F
05/03 09:33, 11F
→
05/03 14:38, , 12F
05/03 14:38, 12F
→
05/03 14:38, , 13F
05/03 14:38, 13F
→
05/03 14:39, , 14F
05/03 14:39, 14F
→
05/03 14:39, , 15F
05/03 14:39, 15F
→
05/03 14:39, , 16F
05/03 14:39, 16F
→
05/04 06:56, , 17F
05/04 06:56, 17F
推
05/10 17:23, , 18F
05/10 17:23, 18F
→
05/10 17:24, , 19F
05/10 17:24, 19F
→
05/12 10:26, , 20F
05/12 10:26, 20F