开发者

how to get the path of the file in real device

开发者 https://www.devze.com 2023-03-30 03:04 出处:网络
i have created an android application which takes the input qrcode image from it sdcard. i supply it as follows:

i have created an android application which takes the input qrcode image from it sdcard. i supply it as follows:

Bitmap bMap = BitmapFactory.decodeFile("/sdcard/qr_16.png");
 LuminanceSource source = new RGBLuminanceSource(bMap); 
        BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
开发者_运维技巧        Reader reader = new MultiFormatReader();

where qr_16.png is the image i had manually loaded in to sdcard. what should i do to run it on real device, what steps should i follow. i am newbea in this field please help. thanks in advance.


Try this :>

http://www.higherpass.com/Android/Tutorials/Working-With-Images-In-Android/2/


You can use

Environment.getExternalStorageState();

to access the external SD. In Eviroment there are other methods to access different and important paths

0

精彩评论

暂无评论...
验证码 换一张
取 消