Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

Notification Profiles


  • Please log in to reply
43 replies to this topic

#1 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 24 January 2011 - 01:56 PM

I'm putting together a "notification profiles" patch, supporting finer-grained (per app) control of notification sounds/vibrate/lights, and grouped into profiles (meeting, silent, car etc). App control (eg Tasker) will also be supported. Think of it as "Quiet hours++". Would that interest people?

I've finished most of the framework changes, and embarking on the settings screens. Just wondered if there was any feedback before I get to far down the road.

Features so far:
- A set of profiles can be defined, eg. work, home, night, silent, meeting).
- Each profile can have a number of notification groups eg. incoming call, sms, email, gmail, other
- You can assign many apps to each group. The group is then be configured to change the notification behaviour for those apps.
- Each of lights, vibrate and sound can be configured to either: override default/app setting, suppress default/app setting (ie silent), or leave unchanged.
- Profile switching can be done manually, using a menu, or delegated to an app, for example Tasker, Locale, or a widget.
- An app will also be able to configure the profiles.

This will only work for Notifications, delivered using the NotificationManager to start with. However, the api will also allow the current profile to be queried, allowing apps such as Dialer and Skype to honour the settings. I will probably upgrade the Dialer so that incoming calls are handled, and this could also serve as a reference implementation.

There ARE api changes - this is necessary. A ProfileManager is exposed as a system service. However, much of the functionality can be contained in the ROM anyway, so it shouldn't prove to be an issue.

I know I'll certainly get use out of it, even if it doesn't get accepted.

#2 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 24 January 2011 - 11:16 PM

First indications are good - handled SMS profile, overriding notifications from Handcent and Messaging.

Anyone out there who wouldn't mind putting together an icon for the settings screen? I'm rubbish at this kind of thing. Needs to fit the established style - the menu text displayed is "Profiles", maybe musical notes?

#3 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 27 January 2011 - 09:50 AM

Well... if anyone is interested, I'm making some progress on this. Basics are in my github repos:

https://github.com/martinlong1978

#4 cheeseitlvr

cheeseitlvr
  • Donators
  • 3 posts
  • Twitter:cheeseitlvr
  • Country:
    us - United States
  • Location:
    Mid Atlantic
  • Device Model:
    LG Thrill
  • CM Version:
    Thriller 1.1.0
  • Recovery Image:
    ClockworkMod

Posted 08 March 2011 - 10:08 PM

View PostMartinLong, on 27 January 2011 - 09:50 AM, said:

Well... if anyone is interested, I'm making some progress on this. Basics are in my github repos:

https://github.com/martinlong1978
Seems interesting, I can't wait to try this in CM7 RC2 unless they are using another iteration. Anyways, thanks for your hard work!

#5 Westi01

Westi01
  • Members
  • 16 posts
  • Country:
    de - Germany
  • Device Model:
    HTC Legend
  • CM Version:
    Cyanogenmod 7
  • Recovery Image:
    ClockworkMod

Posted 29 March 2011 - 07:49 PM

Only a short question. Is there a way to control these profiles with Tasker ? I cannot find a setting for that. Or does it need an update of Tasker ?

#6 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 29 March 2011 - 07:50 PM

Not yet. The API is ready, but I haven't created a Tasker/Locale plugin yet.

#7 Westi01

Westi01
  • Members
  • 16 posts
  • Country:
    de - Germany
  • Device Model:
    HTC Legend
  • CM Version:
    Cyanogenmod 7
  • Recovery Image:
    ClockworkMod

Posted 29 March 2011 - 07:55 PM

Ah thanks for the fast reply. And where can I set mp3 ringtones to the profiles ? I am only seeing the preinstalled ones. Thank you very much for this Patch :)

#8 Rena

Rena
  • Members
  • 11 posts
  • Twitter:RenaKunisaki
  • Country:
    ca - Canada
  • Location:
    Midwest Alberta
  • Device Model:
    Milestone
  • CM Version:
    CyanogenMod 7
  • Recovery Image:
    TWRP

Posted 30 March 2011 - 06:42 AM

I'd be interested in this for sure. :D

#9 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 30 March 2011 - 08:00 AM

It uses the default ringtone chooser, built into the OS. To use MP3 ringtones you can either:
- Use an app which converts your MP3s to ringtones
- Use an app which replaces the default chooser (such as Handcent).

I do the second option. The handcent chooser is pretty good.

#10 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 31 March 2011 - 08:31 PM

All... the Tasker/Local plugin is now available, for a very small fee:

http://j.mp/i1idgH

#11 Westi01

Westi01
  • Members
  • 16 posts
  • Country:
    de - Germany
  • Device Model:
    HTC Legend
  • CM Version:
    Cyanogenmod 7
  • Recovery Image:
    ClockworkMod

Posted 01 April 2011 - 12:07 PM

View PostMartinLong, on 31 March 2011 - 08:31 PM, said:

All... the Tasker/Local plugin is now available, for a very small fee:

http://j.mp/i1idgH

Thanks man! Did you upload the app to another Market (ex. appbrain) ? I dont have a credit card to pay it :(

#12 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 01 April 2011 - 01:12 PM

It should appear on appbrain soon. I've checked but it's not there yet. Though I don't think you can use appbrain to buy apps.

I'll investigate other options.

#13 Westi01

Westi01
  • Members
  • 16 posts
  • Country:
    de - Germany
  • Device Model:
    HTC Legend
  • CM Version:
    Cyanogenmod 7
  • Recovery Image:
    ClockworkMod

Posted 01 April 2011 - 01:26 PM

View PostMartinLong, on 01 April 2011 - 01:12 PM, said:

It should appear on appbrain soon. I've checked but it's not there yet. Though I don't think you can use appbrain to buy apps.

I'll investigate other options.
Ok thanks. Pay Pal would be nice.

#14 crachel

crachel
  • Members
  • 8 posts
  • Country:
    us - United States
  • Location:
    Wichita Falls, TX
  • Device Model:
    GT-I9100
  • CM Version:
    Nightly
  • Recovery Image:
    ClockworkMod

Posted 03 April 2011 - 01:21 PM

Hello Martin, now that you've made a Tasker plugin, I see how I will be able to integrate your Profile Settings into my setup. I do have a question though:

Let us say I'm in the 'Work' profile and looking at the 'GMail' app category. What function does 'Ring mode' & 'Phone ringtone' serve for this category since the dialer isn't included? I understand 'Notification mode' & 'Notification tone' & the 'Vibrate mode' & 'Lights mode'. Would the 'Ring mode' & 'Phone ringtone' settings only matter if the 'Phone' app happens to be included in the current app category? Should I just leave these two settings untouched?

#15 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 03 April 2011 - 02:01 PM

View Postcrachel, on 03 April 2011 - 01:21 PM, said:

Hello Martin, now that you've made a Tasker plugin, I see how I will be able to integrate your Profile Settings into my setup. I do have a question though:

Let us say I'm in the 'Work' profile and looking at the 'GMail' app category. What function does 'Ring mode' & 'Phone ringtone' serve for this category since the dialer isn't included? I understand 'Notification mode' & 'Notification tone' & the 'Vibrate mode' & 'Lights mode'. Would the 'Ring mode' & 'Phone ringtone' settings only matter if the 'Phone' app happens to be included in the current app category? Should I just leave these two settings untouched?

Yes, you are correct. The 'Ring Mode' and 'Phone Ringtone' only apply to categories which include the Phone app, or another app that might "ring", such as Skype, or another VOIP app. They are separate, as some apps might both ring and generate notifications. Eg, for the phone app, you might like a different ringtone to the sound for missed call notifications.

#16 crachel

crachel
  • Members
  • 8 posts
  • Country:
    us - United States
  • Location:
    Wichita Falls, TX
  • Device Model:
    GT-I9100
  • CM Version:
    Nightly
  • Recovery Image:
    ClockworkMod

Posted 03 April 2011 - 05:18 PM

View PostMartinLong, on 03 April 2011 - 02:01 PM, said:

Yes, you are correct. The 'Ring Mode' and 'Phone Ringtone' only apply to categories which include the Phone app, or another app that might "ring", such as Skype, or another VOIP app. They are separate, as some apps might both ring and generate notifications. Eg, for the phone app, you might like a different ringtone to the sound for missed call notifications.

Thanks, I understand now.

I was running some tests, switching between profiles to see behavior of the profiles. I have added Google Voice & Google Talk to my 'SMS' app group. I had a profile that overrode the 'Notification tone' of the SMS group and this worked correctly for Google Voice & Messaging but the Google Talk app still fired its selected ringtone, not the overridden sound from the Profile.

#17 Westi01

Westi01
  • Members
  • 16 posts
  • Country:
    de - Germany
  • Device Model:
    HTC Legend
  • CM Version:
    Cyanogenmod 7
  • Recovery Image:
    ClockworkMod

Posted 07 April 2011 - 05:22 PM

Martin,
Could you please upload your app to the AndAppStore so we can purchase via PayPal ?

#18 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 07 April 2011 - 06:22 PM

Oh... ok then ;-)

http://j.mp/gapQQJ

#19 tcommander

tcommander
  • Members
  • 11 posts
  • Device Model:
    HTC Incredible
  • CM Version:
    CM7 RC4
  • Recovery Image:
    ClockworkMod

Posted 08 April 2011 - 11:38 AM

Martin, this idea is fantastic.  I am struggling a bit to get the behaviors like I want.  Is there any FAQ/tutorial on the Profile settings?  I thought I had it figured out but Gtalk started making noise in the middle of the night...Clearly I need to work on it more.  I have purchased the Tasker plug in so I'm well on my way.  Thanks for this feature it has been a sore spot with Android for me since I got my phone a year ago.

#20 MartinLong

MartinLong
  • Members
  • 70 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC Desire
  • CM Version:
    7
  • Recovery Image:
    ClockworkMod

Posted 08 April 2011 - 12:21 PM

I haven't had time to do any documentation yet - difficult with a family, and I think I used up most of my "credit" writing the implementation. I'll try to put something up once I get around to it.

It's a shame it needs documenting - I would like to try and make it so obvious that it doesn't need documenting. Any suggestions would be useful, though I can't always guarantee it's possible.