[Q] CM9 & Email subfolder notification

Thenetstriker

Senior Member
Jul 24, 2008
163
104
0
Didnt seem to do it, but im still playing around with it. What version of Email.apk are you on? I did notice I had to go to com.google.android.email, as opposed to com.android.email. I am on 6.0-920375.
My email app has the version 4.4-1918611f5c. What Android version are you using? This only works on the latest 4.4 Android version. (e.g. by using the CyanogenMod 11 builds from Freexperia)
 
  • Like
Reactions: phubarr

briangig

Senior Member
Sep 13, 2012
56
5
0
My email app has the version 4.4-1918611f5c. What Android version are you using? This only works on the latest 4.4 Android version. (e.g. by using the CyanogenMod 11 builds from Freexperia)
Weird...I am on Stock 4.4, KRT16S (Nexus 4). I thought the new Email app was version 6 across the board? I guess I need to fine me a new ROM.
 

Thenetstriker

Senior Member
Jul 24, 2008
163
104
0
Weird...I am on Stock 4.4, KRT16S (Nexus 4). I thought the new Email app was version 6 across the board? I guess I need to fine me a new ROM.
Ok, I never had an Nexus phone, so I can just guess. Maybe Google rolls out a separat email application in their stock rom. (They also have a separate app for the camera on the Nexus phones, so it wouldn't suprise me) The new email app should look exacly like the current gmail app.
 
  • Like
Reactions: phubarr

briangig

Senior Member
Sep 13, 2012
56
5
0
Ok, I never had an Nexus phone, so I can just guess. Maybe Google rolls out a separat email application in their stock rom. (They also have a separate app for the camera on the Nexus phones, so it wouldn't suprise me) The new email app should look exacly like the current gmail app.
Yep, my email app looks like gmail, with the sliding drawer. I am flashing a CM11 based ROM now to see if I can get this to work.
 

briangig

Senior Member
Sep 13, 2012
56
5
0
Been playing around with this tonight, I can't get it to work. I even downloaded a Freexperia CM11 ROM for the yuga and extracted the Email.apk (still didn't give me the build # you had, but it was closer). It just seems to ignore the *.xml files I add in for each folder.
 

Thenetstriker

Senior Member
Jul 24, 2008
163
104
0
Been playing around with this tonight, I can't get it to work. I even downloaded a Freexperia CM11 ROM for the yuga and extracted the Email.apk (still didn't give me the build # you had, but it was closer). It just seems to ignore the *.xml files I add in for each folder.
I just read the comments on the google thread: https://code.google.com/p/android/issues/detail?id=50188
It appears to me that you found the problem in the meantime, or are you not brian.. @gmail.com?
 
  • Like
Reactions: phubarr

whyspee

New member
Dec 28, 2013
1
0
0
Database downgrade issue

Yesterday I took the time and looked at the code of the email app again and I think I found a much cleaner and simpler solution with less code changes. On my Xperia Z it works very good so far. I've attached the code changes and the install zip to this message. Please report any problems that occur with this version. If there are no problems with this version I will try to submit the changes to the CyanogenMod repository. I think this solution could be clean enough for them to merge it into their sources.

For those who have problems installing the zip file: Please check if the email apk file under /system/app is also named Email2.apk. If it has another name then rename the file in the zip file to match the name on your device so that it will be overwritten on install.
Hi.
First, thanks a lot Thenetstriker for this very interesting improvement on the E-mail app!
However I hadn't the possibility to test your app since I got an exception that caused the app to crash when I started it.
Here's the stack trace:

12-28 18:59:52.265: I/ActivityManager(592): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.android.email cmp=com.android.email/.activity.Welcome} from pid 6440
12-28 18:59:52.385: I/ActivityManager(592): Start proc com.android.email for activity com.android.email/.activity.Welcome: pid=7013 uid=10018 gids={50018, 3003, 1015, 1028}
12-28 18:59:52.485: W/dalvikvm(7013): threadid=11: thread exiting with uncaught exception (group=0x4173f7c0)
12-28 18:59:52.485: D/ExchangeService(1641): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = true
12-28 18:59:52.485: E/AndroidRuntime(7013): FATAL EXCEPTION: AsyncTask #1
12-28 18:59:52.485: E/AndroidRuntime(7013): java.lang.RuntimeException: An error occured while executing doInBackground()
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.os.AsyncTask$3.done(AsyncTask.java:299)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.lang.Thread.run(Thread.java:841)
12-28 18:59:52.485: E/AndroidRuntime(7013): Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 40 to 39
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.database.sqlite.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:361)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:255)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.provider.EmailProvider.getDatabase(EmailProvider.java:478)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.provider.EmailProvider.query(EmailProvider.java:1106)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentProvider.query(ContentProvider.java:744)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentProvider$Transport.query(ContentProvider.java:199)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentResolver.query(ContentResolver.java:414)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentResolver.query(ContentResolver.java:357)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.Email.setServicesEnabledSync(Email.java:114)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.Email$1.run(Email.java:96)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.emailcommon.utility.EmailAsyncTask$1.doInBackground(EmailAsyncTask.java:247)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.emailcommon.utility.EmailAsyncTask$1.doInBackground(EmailAsyncTask.java:244)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.emailcommon.utility.EmailAsyncTask$InnerTask.doInBackground(EmailAsyncTask.java:118)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.os.AsyncTask$2.call(AsyncTask.java:287)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-28 18:59:52.485: E/AndroidRuntime(7013): ... 3 more
12-28 18:59:52.495: W/ActivityManager(592): Force finishing activity com.android.email/.activity.Welcome
12-28 18:59:52.545: W/dalvikvm(7013): threadid=13: thread exiting with uncaught exception (group=0x4173f7c0)
12-28 18:59:52.545: I/Process(7013): Sending signal. PID: 7013 SIG: 9


I run cm-10.2.0-mako and I installed this version of Google Apps: gapps-jb-20130813-signed.
So you probably know better than me where the problem can come from. At least I guess the best thing to do would be to update your app to match the latest version of the E-mail app but I know it's very easy to say but way harder to do! ;)
Otherwise, do you know how I can downgrade the database? Should I erase the preferences and cache of the E-mail app for example? Or delete my e-mail accounts from the phone?
Thanks in advance for your answer! :cyclops:
 
Last edited:

Thenetstriker

Senior Member
Jul 24, 2008
163
104
0
Hi.
First, thanks a lot Thenetstriker for this very interesting improvement on the E-mail app!
However I hadn't the possibility to test your app since I got an exception that caused the app to crash when I started it.
Here's the stack trace:

12-28 18:59:52.265: I/ActivityManager(592): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.android.email cmp=com.android.email/.activity.Welcome} from pid 6440
12-28 18:59:52.385: I/ActivityManager(592): Start proc com.android.email for activity com.android.email/.activity.Welcome: pid=7013 uid=10018 gids={50018, 3003, 1015, 1028}
12-28 18:59:52.485: W/dalvikvm(7013): threadid=11: thread exiting with uncaught exception (group=0x4173f7c0)
12-28 18:59:52.485: D/ExchangeService(1641): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = true
12-28 18:59:52.485: E/AndroidRuntime(7013): FATAL EXCEPTION: AsyncTask #1
12-28 18:59:52.485: E/AndroidRuntime(7013): java.lang.RuntimeException: An error occured while executing doInBackground()
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.os.AsyncTask$3.done(AsyncTask.java:299)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.lang.Thread.run(Thread.java:841)
12-28 18:59:52.485: E/AndroidRuntime(7013): Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 40 to 39
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.database.sqlite.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:361)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:255)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.provider.EmailProvider.getDatabase(EmailProvider.java:478)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.provider.EmailProvider.query(EmailProvider.java:1106)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentProvider.query(ContentProvider.java:744)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentProvider$Transport.query(ContentProvider.java:199)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentResolver.query(ContentResolver.java:414)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.content.ContentResolver.query(ContentResolver.java:357)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.Email.setServicesEnabledSync(Email.java:114)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.email.Email$1.run(Email.java:96)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.emailcommon.utility.EmailAsyncTask$1.doInBackground(EmailAsyncTask.java:247)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.emailcommon.utility.EmailAsyncTask$1.doInBackground(EmailAsyncTask.java:244)
12-28 18:59:52.485: E/AndroidRuntime(7013): at com.android.emailcommon.utility.EmailAsyncTask$InnerTask.doInBackground(EmailAsyncTask.java:118)
12-28 18:59:52.485: E/AndroidRuntime(7013): at android.os.AsyncTask$2.call(AsyncTask.java:287)
12-28 18:59:52.485: E/AndroidRuntime(7013): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
12-28 18:59:52.485: E/AndroidRuntime(7013): ... 3 more
12-28 18:59:52.495: W/ActivityManager(592): Force finishing activity com.android.email/.activity.Welcome
12-28 18:59:52.545: W/dalvikvm(7013): threadid=13: thread exiting with uncaught exception (group=0x4173f7c0)
12-28 18:59:52.545: I/Process(7013): Sending signal. PID: 7013 SIG: 9


I run cm-10.2.0-mako and I installed this version of Google Apps: gapps-jb-20130813-signed.
So you probably know better than me where the problem can come from. At least I guess the best thing to do would be to update your app to match the latest version of the E-mail app but I know it's very easy to say but way harder to do! ;)
Otherwise, do you know how I can downgrade the database? Should I erase the preferences and cache of the E-mail app for example? Or delete my e-mail accounts from the phone?
Thanks in advance for your answer! :cyclops:
I didn't upload the email app for CM 10.2 because with CM11 will come a much better solution for the problem. There it is a simple matter of creating a config file to enable the notifications. For this approach I've just uploaded an app to the play store: https://play.google.com/store/apps/details?id=ch.masshardt.emailnotification

If there are any problems with the app please report them here and attach the logcat logs.
 
  • Like
Reactions: phubarr and mrd7rs

Kiristiba

Senior Member
Mar 14, 2011
295
86
0
I didn't upload the email app for CM 10.2 because with CM11 will come a much better solution for the problem. There it is a simple matter of creating a config file to enable the notifications. For this approach I've just uploaded an app to the play store: https://play.google.com/store/apps/details?id=ch.masshardt.emailnotification

If there are any problems with the app please report them here and attach the logcat logs.
Hi, PlayStore sais my phone is not compatible with the app!
I'm running Android 4.1 but i have the 4.4 Email App installed
or is it because my phone ist x86 instead of arm?
can you upload the apk on xda or loose the restrictions in playstore?

big thx :)
 

Blunt_Dude

Member
Nov 25, 2009
7
1
0
Centurion
So I flashed a CM11 based ROM, and now have 4.4-aa7eca884b..close to yours I guess.

If I go into the \data\data\com.android.email\shared_prefs\ folder, there is no [email protected] folder, just the account, etcs.
Hi

I also don't have a file / folder with account name. I only have 2 files in here.AndroidMail.Main.xml and com.android.email_preferences.xml

Am I in the wrong folder or maybe misunderstood where I need to check all of this.

Thanks,
 

Thenetstriker

Senior Member
Jul 24, 2008
163
104
0
Hi

I also don't have a file / folder with account name. I only have 2 files in here.AndroidMail.Main.xml and com.android.email_preferences.xml

Am I in the wrong folder or maybe misunderstood where I need to check all of this.

Thanks,
There should be an account property like "Send notification when emails arrive" in your email account settings that needs to be checked. After that the file should appear. (This is the config file for the inbox folder)
 
  • Like
Reactions: phubarr

PoloB12

Member
Sep 8, 2011
26
2
0
Nice initiative!

any chance this will work with Gmail 5.0 / Exchange Services 6.5 in the future ?

After the update on 11-11 it works also with Gmail 5.0 on my Nexus 4 running source built Lollipop
 
Last edited:
Jul 29, 2010
25
8
0
Bucharest
Dumb question here: does the app work for IMAP accounts too? Or just for Exchange accounts? 'Cause I've been fiddling with it for the last days and both Gmail and stock Email app just query the Inbox folder, ignoring the rest of subfolders...
Using SlimKat on a Note II LTE, if that has any relevance.

Many thanks.
 

Asudef

New member
Dec 31, 2010
3
1
0
Has anyone else been getting the "Email database not found" message?

This is on a Nexus 5 with rooted stock KitKatBar.
It continues with:

"Email database not found in /data/data/com.google.android.email/databases/EmailProvider.db. Please report the location of your email database."

The only option it gives is to click OK and the app terminates. My /data folder is blank and the /com.google.android.email only has a cache folder in it.
 
  • Like
Reactions: ShamaN4ik

ShamaN4ik

New member
Nov 13, 2011
3
0
0
Moscow
Has anyone else been getting the "Email database not found" message?

This is on a Nexus 5 with rooted stock KitKatBar.
It continues with:

"Email database not found in /data/data/com.google.android.email/databases/EmailProvider.db. Please report the location of your email database."

The only option it gives is to click OK and the app terminates. My /data folder is blank and the /com.google.android.email only has a cache folder in it.
Have the same problem.
The real path to DB is:
/data/data/com.google.android.gm/databases/EmailProvider.db
Shared prefs:
/data/data/com.google.android.gm/shared_prefs
And the manual instructions at the first post of this topic didn't helped me.
I have OnePlus 3T A3003 with Oxygen OS 4.1.3 (beta7) (Android 7.1.1) and Gmail version 7.4.23.154506495.release.

Anyone have any ideas?
 
Last edited:
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone