13

I am looking for a solution regarding a repeating log print that is caused by calling BitmapFactory.decodeFile.

In My app i have a ListView that is being redrawn by a timer every second. The ListView has an ImageView that gets is image source from the local storage, (not from the network)

The image is stored in :

filePath = /data/data/com.xxx.testlib/files/b22a1a294fd6e5ad3ea3d25b63c4c735.jpg

I am using the following code to redraw the image and it is working fine. with out exception.

try
{
 File filePath = context.getFileStreamPath(imageName);

 if(filePath.exists()){

    bMap = BitmapFactory.decodeFile(filePath.getPath());

 }

}catch (Exception e) 
{

 e.printStackTrace();

}

But when preforming the following line :

bMap = BitmapFactory.decodeFile(filePath.getPath());

I get a print in the log as follow:

03-07 09:55:29.100: I/System.out(32663): Not a DRM File, opening notmally
03-07 09:55:29.105: I/System.out(32663): buffer returned 
....

How can i get read from the printing to the log.

Thank you lior

Edit

Also it lags the phone whenever this operation is performed. And this reduced performance is noticeable specially when the phone is Waked up and we return to activity with this code.

Its more than a year for OP and still no answer is found. If anyone has found solution then please post it.

Thank you.

BlueSword
  • 1,290
  • 12
  • 25
user2143411
  • 131
  • 1
  • 3
  • I'm having the same problem, bitmap is successfully returned but every time it executes `BitmapFactory.DecodeFile` it prints this message in the console. Have you found anything to solve the issue yet? – ForceMagic Apr 02 '14 at 15:00
  • And what is the issue? It works, it just logs info to the log. That's what log is for... – Jaa-c Jul 26 '14 at 13:55

3 Answers3

2

DRM stands for Digital Rights Management. It's normally a special keys used by owners of content to make sure that your device is authorized to view/play the content. iTunes was notorious for this for ages.

All it's doing is letting you know that the material you are opening is not DRM protected, and therefore can be opened normally.

Umer Kiani
  • 3,783
  • 5
  • 36
  • 63
-1

Hope, this might help you.

I also got the same exception when i tried to save the image captured by camera directly to : /data/data/com.xxx.testlib/images/b22a1a294fd6e5ad3ea3d25b63c4c735.jpg.

Then i first saved the image to default location used by camera and the copied it to : /data/data/com.xxx.testlib/images/b22a1a294fd6e5ad3ea3d25b63c4c735.jpg.

and now "Not a DRM File, opening notmally" is removed from the log and saved the image successfully.

Conclussion : folder :- "/data/data/com.xxx.testlib/" is private and can be accessible from inside the application only.

Nishant
  • 93
  • 4
  • this not the solution in any way, as this problem is not pertinent only while reading/writing file from sdcard. This problem occurs whenever we use `BitmapFactory`! – BlueSword Feb 14 '14 at 06:36
-1

Maybe it's a permission error. Do you have added the right permission in your Manifest ?

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

tryp
  • 1,120
  • 20
  • 26