Excuse me, quick question:
I have this routine of video stream, where I receive packets, convert them to byte[] ,then to bitmaps, then display them on the screen:
<The getDir
method of ContextWrapper
will automatically create the imageDir
directory if it does not already exist according to the docs. Additionally, you cannot access anything in the /data
directory outside of your application code unless you have root access. If you would like to view the images you saved in this directory, you can run the adb
tool in a command prompt to move the images into a publicly accessible directory:
adb shell run-as com.your.packagename cp -r /data/data/com.your.packagename/app_data/imageDir /sdcard/imageDir
Note that the run-as
command will only work if your application is debuggable.
You can replace /sdcard/imageDir
with any directory you have permission to access on the device. If you would like to subsequently move the files off the device and onto your machine, you can use adb pull
to pull the files from the public directory:
adb pull /sdcard/myDir C:\Users\Desktop
Again, replace /sdcard/myDir
and C:\Users\Desktop
with the appropriate source and destination directories.