You could have shortened the code, but it appears your app doesn't have permission to read from the data directory.
So ask for permission and gracefully handle when it doesn't read the file.
On Apr 4, 2012 9:08 AM, "s.rawat" <imsaurabhrawat@gmail.com> wrote:
-- HI ,
I am trying to share the video on long press by using the share intent.I am able to share the image (.jpg) but not able to share the videos on facebook.
Following is my code.
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("video/3gpp");
Uri uri = Uri.fromFile(new File(imageFilePath)); //image file is the /mnt/sdcard/<file folder/file name with extension- 3gpp>
share.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(share,"Share Video"));
I am getting this error .
Retrieve application default SharedPreferences.
D/ACRA ( 7160): Set OnSharedPreferenceChangeListener.
D/ACRA ( 7160): ACRA is enabled for com.facebook.katana, intializing...
D/ACRA ( 7160): Looking for error files in /data/data/com.facebook.katana/app_acra-reports
D/dalvikvm( 7160): GC_CONCURRENT freed 746K, 48% free 3521K/6727K, external 1892K/2137K, paused 4ms+3ms
D/dalvikvm( 7160): GC_EXTERNAL_ALLOC freed 54K, 49% free 3484K/6727K, external 1925K/2137K, paused 23ms
I/ActivityManager( 115): Displayed com.facebook.katana/.activity.media.UploadVideoActivity: +1s201ms
D/dalvikvm( 192): GC_EXTERNAL_ALLOC freed 127K, 51% free 3096K/6215K, external 7414K/7681K, paused 72ms
D/dalvikvm( 7160): GC_CONCURRENT freed 582K, 44% free 3891K/6919K, external 2360K/2837K, paused 2ms+3ms
D/dalvikvm( 7160): GC_CONCURRENT freed 1067K, 48% free 3954K/7495K, external 2360K/2837K, paused 3ms+3ms
D/AndroidRuntime( 7160): Shutting down VM
W/dalvikvm( 7160): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/ACRA ( 7160): ACRA caught a NullPointerException exception for com.facebook.katana. Building report.
D/ACRA ( 7160): Retrieve application default SharedPreferences.
I/ACRA ( 7160): READ_LOGS not allowed. ACRA will not include LogCat and DropBox data.
D/dalvikvm( 7160): GC_CONCURRENT freed 1015K, 46% free 4128K/7623K, external 2380K/2837K, paused 2ms+3ms
D/ACRA ( 7160): Writing crash report file.
D/ACRA ( 7160): Mark all pending reports as approved.
D/ACRA ( 7160): Looking for error files in /data/data/com.facebook.katana/app_acra-reports
V/ACRA ( 7160): About to start ReportSenderWorker from #handleException
D/ACRA ( 7160): Add user comment to null
D/ACRA ( 7160): #checkAndSendReports - start
D/ACRA ( 7160): Looking for error files in /data/data/com.facebook.katana/app_acra-reports
I/ACRA ( 7160): Sending file 1333563805000-approved.stacktrace
D/ACRA ( 7160): Connect to https://www.facebook.com/mobile/android_crash_logs/
D/ACRA ( 7160): Setting httpPost headers
D/ACRA ( 7160): Sending request to https://www.facebook.com/mobile/android_crash_logs/
W/ResponseProcessCookies( 7160): Invalid cookie header: "Set-Cookie: datr=aER8T715TPEZWlWU-IknhcD0; expires=Fri, 04-Apr-2014 12:54:00 GMT; path=/; domain=.facebook.com; httponly". Unable to parse expires attribute: Fri
D/ACRA ( 7160): #checkAndSendReports - finish
E/AndroidRuntime( 7160): FATAL EXCEPTION: main
E/AndroidRuntime( 7160): java.lang.NullPointerException
E/AndroidRuntime( 7160): at com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:144)
E/AndroidRuntime( 7160): at com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:165)
E/AndroidRuntime( 7160): at com.facebook.katana.binding.AppSession.postToService(AppSession.java:4212)
E/AndroidRuntime( 7160): at com.facebook.katana.service.method.VideoUpload.RequestVideoUpload(VideoUpload.java:73)
E/AndroidRuntime( 7160): at com.facebook.katana.activity.media.UploadVideoActivity.upload(UploadVideoActivity.java:209)
E/AndroidRuntime( 7160): at com.facebook.katana.activity.media.UploadVideoActivity.onClick(UploadVideoActivity.java:169)
E/AndroidRuntime( 7160): at android.view.View.performClick(View.java:2485)
E/AndroidRuntime( 7160): at android.view.View$PerformClick.run(View.java:9080)
E/AndroidRuntime( 7160): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 7160): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 7160): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 7160): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 7160): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 7160): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 7160): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 7160): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 7160): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 115): Force finishing activity com.facebook.katana/.activity.media.UploadVideoActivity
W/ActivityManager( 115): Activity pause timeout for HistoryRecord{4088a158 com.facebook.katana/.activity.media.UploadVideoActivity}
W/ActivityManager( 115): Activity destroy timeout for HistoryRecord{4088a158 com.facebook.katana/.activity.media.UploadVideoActivity}
D/dalvikvm( 6757): GC_EXPLICIT freed 11K, 45% free 3368K/6087K, external 1625K/2137K, paused 58ms
D/dalvikvm( 742): GC_EXPLICIT freed 2K, 50% free 2708K/5379K, external 1625K/2137K, paused 65ms
D/dalvikvm( 597): GC_EXPLICIT freed 63K, 51% free 3104K/6215K, external 2213K/2764K, paused 58ms
D/dalvikvm( 619): GC_EXPLICIT freed 386K, 52% free 3240K/6727K, external 1912K/2137K, paused 75ms
D/dalvikvm( 749): GC_EXPLICIT freed 7K, 45% free 3712K/6663K, external 1625K/2137K, paused 62ms
D/dalvikvm( 5166): GC_EXPLICIT freed 6K, 50% free 2725K/5379K, external 1625K/2137K, paused 55ms
D/dalvikvm( 6588): GC_EXPLICIT freed 6K, 49% free 3512K/6855K, external 1625K/2137K, paused 61ms
Does any one have any idea on this.is the video sharing via mobile llowed for 3gpp formats.I checked thier site and it does says "3gpp" as the allowed format.
Please advice/Help.
Rgds
Saurabh
"..pain is temporary.....quitting lasts forever....."
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment