kailIII / android-notifier

Automatically exported from code.google.com/p/android-notifier
0 stars 0 forks source link

Allow other applications to send notifications through Android Notifier #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

More and custom triggers for notifications, new mail (gmail, k9-mail), market 
updates. Would also like to be able to trigger a custom event from Tasker ( 
http://tasker.dinglisch.net/ )

Original issue reported on code.google.com by Fuzzy...@gmail.com on 8 Sep 2010 at 9:56

GoogleCodeExporter commented 9 years ago
See issues 7, 32 and 42 which requested basically the same.

Original comment by rdamazio@gmail.com on 8 Sep 2010 at 1:22

GoogleCodeExporter commented 9 years ago

Issue 42 is not the same. Tasker can use intents from other applications, they 
just need to be published. I'm talking about allowing other applications to USE 
the notifier to send their own messages.

Original comment by Fuzzy...@gmail.com on 8 Sep 2010 at 1:43

GoogleCodeExporter commented 9 years ago
Right. Sounds quite reasonable. I'm not familiar with Tasker - what does it 
expect? Can it call to a service, or just intents?

Original comment by rdamazio@gmail.com on 9 Sep 2010 at 2:06

GoogleCodeExporter commented 9 years ago
I implemented (basic) support for 'user' notifications. Other apps can send 
notifications with the following Intent:

Intent i = new Intent("org.damazio.notifier.service.UserReceiver.USER_MESSAGE");
i.putExtra("message", "Some message");
i.putExtra("title", "Some Title");

The Linux client supports it.

Diff is attached.

Original comment by mrsnowfl...@gmail.com on 10 Sep 2010 at 2:46

Attachments:

GoogleCodeExporter commented 9 years ago
Nice! I'll integrate the android side soon.

Bill, can you look at the linux-side changes?
Leandro - do you think we should also add this to the multiplatform client?

Original comment by rdamazio@gmail.com on 10 Sep 2010 at 3:32

GoogleCodeExporter commented 9 years ago
We'll need another notification type, it could be something generic like 
"OTHER" or "THIRDPARTY"

Original comment by lehph...@gmail.com on 10 Sep 2010 at 4:22

GoogleCodeExporter commented 9 years ago
Yup, or "APP".

Original comment by rdamazio@gmail.com on 10 Sep 2010 at 5:27

GoogleCodeExporter commented 9 years ago
Ok, I'll wait the changes to the android app before updating AND.

Original comment by lehph...@gmail.com on 10 Sep 2010 at 5:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I added the new notification type "USER", although another name might be more 
appropriate.

Original comment by mrsnowfl...@gmail.com on 11 Sep 2010 at 11:57

GoogleCodeExporter commented 9 years ago
This has been merged in r243 and r244.
Leandro, can you implement support for this in the multi-platform client?
I'll also implement it in the Mac client.

Original comment by rdamazio@gmail.com on 18 Sep 2010 at 10:43

GoogleCodeExporter commented 9 years ago
Attached is a newer version of the Android app with support for this. Please 
give it some testing.
Also notice your current desktop clients probably won't display this yet, let's 
wait for Leandro's new version (for now you can either use the python client 
for linux or sniff the packets to see that they're arriving).

Original comment by rdamazio@gmail.com on 18 Sep 2010 at 11:30

Attachments:

GoogleCodeExporter commented 9 years ago
Mac side added on r248.
Leandro, please add support to the multiplatform app soon as I'm releasing this 
tonight.

Original comment by rdamazio@gmail.com on 19 Sep 2010 at 5:04

GoogleCodeExporter commented 9 years ago
Changes committed to AND svn.

Original comment by lehph...@gmail.com on 19 Sep 2010 at 1:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Guys, to complete my contribution, I made a wiki page explaining how to 
implement USER notifications. (Though it's not that hard to figure out yourself 
:-) )

Original comment by mrsnowfl...@gmail.com on 20 Sep 2010 at 1:16

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks! Posted at 
http://code.google.com/p/android-notifier/wiki/ThirdPartyNotifications

Original comment by rdamazio@gmail.com on 20 Sep 2010 at 7:02

GoogleCodeExporter commented 9 years ago
Thanks for this. I am using this with tasker. Not sure if I should file a 
separate issue for this or not but there seems to be a bug.
The instructions in the wiki say that only one of the extras have to be filled 
while sending the intent. However, I noticed that if I don't fill both the 
extras (title AND description), then the notification doesn't pop up in the 
desktop client (0.4.0 on win 7) although the command is still executed (tested 
by opening up notepad.exe on receiving notification).

Original comment by shantanu...@gmail.com on 23 Sep 2010 at 1:53

GoogleCodeExporter commented 9 years ago
Windows will not show a notification balloon if it does not have a description 
text. It's ok to not have title.

Original comment by lehph...@gmail.com on 23 Sep 2010 at 2:13

GoogleCodeExporter commented 9 years ago
Thanks for the clarification. That solves it :) 

Original comment by shantanu...@gmail.com on 23 Sep 2010 at 2:16

GoogleCodeExporter commented 9 years ago
@rdamazio I think the wiki page should be updated with this information.

Original comment by lehph...@gmail.com on 23 Sep 2010 at 2:32

GoogleCodeExporter commented 9 years ago
Sorry, I missed all the fun :(

Can someone (#20 ? ) clarify the config requirement for Tasker. I have 

Action set as    org.damazio.notifier.service.UserReceiver.USER_MESSAGE
Extra set as     EXTRA_TITLE:My Test Title
Extra (2) set as EXTRA_DESCRIPTION: Some text in here

Is this correct? I'm not getting any messages, but tasker isn't complaining.

Fuzzy

Original comment by Fuzzy...@gmail.com on 23 Sep 2010 at 7:01

GoogleCodeExporter commented 9 years ago
@FuzzyCat: I suspect you named both extra's as "title" and "description" and 
not "EXTRA_TITLE" and "EXTRA_DESCRIPTION"?!

Original comment by mrsnowfl...@gmail.com on 23 Sep 2010 at 7:03

GoogleCodeExporter commented 9 years ago
@mrssnowfl... I have the full EXTRA_ parts ( see http://twitpic.com/2r92yq )

Original comment by Fuzzy...@gmail.com on 23 Sep 2010 at 7:11

GoogleCodeExporter commented 9 years ago
@FuzzyCat: I'm not sure how this would work in Tasker. If the convention is: 
"<extras_name>:<value>" then your example would be (verbatim):
title:title
description:some descriptive text.

Original comment by mrsnowfl...@gmail.com on 23 Sep 2010 at 7:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok,

just did a adb logcat and saw this:

W/ActivityManager(   83): Unable to start service Intent { 
act=org.damazio.notifier.service.UserReceiver.USER_MESSAGE (has extras) }: not 
found

Original comment by Fuzzy...@gmail.com on 23 Sep 2010 at 7:36

GoogleCodeExporter commented 9 years ago
Maybe I'll also need to explicitly add the receiver to the android manifest...

Original comment by rdamazio@gmail.com on 23 Sep 2010 at 7:38

GoogleCodeExporter commented 9 years ago
Did you enable it in the Settings?

Original comment by mrsnowfl...@gmail.com on 23 Sep 2010 at 7:38

GoogleCodeExporter commented 9 years ago
I have a tick in the "Third-party apps" box in the settings.

Original comment by Fuzzy...@gmail.com on 23 Sep 2010 at 7:40

GoogleCodeExporter commented 9 years ago
@rdamazio

I'm happy to test it if you need me to install anything.

Original comment by Fuzzy...@gmail.com on 23 Sep 2010 at 7:42

GoogleCodeExporter commented 9 years ago
@rdama: I tested it with a sample application I made and it worked. Though both 
applications were on my phone in unsigned apk's, I don't know if that would 
make a difference.

Original comment by mrsnowfl...@gmail.com on 23 Sep 2010 at 8:07

GoogleCodeExporter commented 9 years ago
It shouldn't. The difference is basically that as it is now, it'll only send 
those notifications if the service is running ('cause that's the timespan 
during which the receiver is registered). Using the xml, it would work at any 
time (which I'm not sure we want anyway).

Original comment by rdamazio@gmail.com on 23 Sep 2010 at 8:21

GoogleCodeExporter commented 9 years ago
I'm not sure I understand, the remote notifier service is running when I try to 
send a message (icon in notification bar too).

Original comment by Fuzzy...@gmail.com on 23 Sep 2010 at 8:34