Images using: nopm: in filename

I recently discovered that images taken with Google Hangouts sometimes add: nopm: to the end of the file name. For example, DCIM / Camera / IMG_20141212_123123: nopm: .jpg

This causes me a lot of parsing problems. One of the biggest was that when I created the File object from this path and tried file.exists (), I GOT FALSE !!!!!

My ultimate goal is that when I come across one of the following: nopm: images, I would just like to rename it on the device and continue processing as usual.

Here is my code:

public static void checkForNopm(File file) { final String path = file.getPath(); if (path.contains(":nopm:")) { final File newfile = new File(file.getPath().replace(":nopm:","")); file.renameTo(newfile); } } 
+7
android file image google-hangouts
source share
2 answers

Read this:

https://android.stackexchange.com/questions/98266/why-is-there-nopm-in-some-photo-file-names

There is no decision. But perhaps this is a way for Google Hangouts to avoid photos due to the management of other utilities. I'm looking for: nopm: when I tried to copy some kind of photo that I took when I played Ingress and shared with Google Hangouts. I approached your question, and then this answer in android listed the second. I think the answer for “No Photo Manager” is more reasonable than “AM / PM”.

If this is true, the best way would be to manually remove these ": nopm:" before you can manage with the tools. But at the same time, other tools, such as Dropbox, can also back up these photos.

+1
source share

It looks like 12 o'clock pm / am. The hour in the photo is 12:31:23, and: nopm: may not mean pm (so, am), or one that is configured with another type like 24-hour.

Have you tried to check if there are hours in photos without: nopm: until 12:00?

0
source share

All Articles