Discussion Forums  >  Status Bar, Navigation Bar

Replies: 10    Views: 753

ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
03/19/13 08:48 PM (11 years ago)

Default Android Push Notification Behaviour

Hi All, I've implemented push notifications in a numer of apps and I am wondering about the default way Android displays notifications. See the notifications pull down menu screenshot below ... http://grab.by/kRE4 Is there a way to get the whole message to show in the notification area? Or is this just the way Android does it? On iOS the user gets the whole message, on Android it varies from device to device but generally my messages are cut off. Does it depend on the device? The above was from my Nexus 7 running the latest Android iOS. Is there anything anyone does to combat this? I understand that the push can have an 'intent' and open the app but all I want to do is push the whole message to the user. TIA. Cheers Darrel
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/19/13 11:27 PM (11 years ago)
I've wondered about that as well. I "thought" I saw it scroll once if I sat there long enough, but I may not be recalling correctly. You were able to get a Nexus 7 to register? Did you get rid of the deviceType from the registration URL to make that happen? I can't get mine to register because of the space in the device name that gets sent - "Nexus 7" vs. "Nexus_7" (or something similar). This is bug that David is tracking down. Mark
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
03/20/13 02:08 AM (11 years ago)
Thanks for the reply @GoNorthWest! So it's not just me :) This is some sort of Android OS behaviour from what I can tell. I haven't implemented push on my BT self hosted. I'm still using Parse at the moment for push so it's not a BT thing. I was wondering if the Android Gurus amongst know the answer? At least iOS works as you'd expect. I'm sure I'll get some Android questions from clients soon. If that's the way it is, fine! I just need to know. Cheers Darrel
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
03/20/13 02:15 AM (11 years ago)
I use parse on Android and I believe what you have described is the basic Android approach, but I suspect that an event handler in your app could do it differently when the app is running, maybe pop up an alert. I may have seen a code snippet in a tutorial on the internet somewhere - I'll try and have a look later today.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
03/20/13 02:32 AM (11 years ago)
@AlanMac, That would be great if you can find it. I think what I want is only available for Android version 4.1 with the "Big View" See more info here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html Do others add code for Android push or go with the default behaviour ... I'm interested to know! cheers
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
03/20/13 05:35 AM (11 years ago)
@ictguy, I thought it scrolled like @GoNorthWest said, but maybe not. One thing clients/customers can do is pull down from the top to see the notifications on the main screen and they can see the all the notification. LA
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
03/20/13 07:19 AM (11 years ago)
Ok, I had a quick trawl and I found the links that I saw before. I'm not much of a programmer, so if you get to make sense of this, do tell! http://developingonandroid.wordpress.com/2011/11/24/3-android-push-notifications-in-parse-a-deep-overview/ http://www.raymondcamden.com/index.cfm/2012/10/10/PhoneGap-Parsecom-and-Push-Notifications
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
03/21/13 12:51 AM (11 years ago)
@LA, On the Nexus 7 your message gets cut off - see the screenshot in the first post - it won;t show the whole 200 characters or whatever the limit is. I'll try other devices to see if they scroll. @AlanMac, thanks I'll take a look the articles. On first pass, they give me a few clues but no solutions :(
 
Imagenparaweb
Aspiring developer
Profile
Posts: 121
Reg: Dec 13, 2011
Cordoba
1,210
like
05/31/13 06:14 AM (10 years ago)
Hello! Is there any way to make the meesage box last longer on the user screen? I receive the notification, but It lasts 2 seconds :/ Of course it remains on the notification area, but as ictguy mentioned, it is cut off. And if I click on it, it opens the app but the message is lost. Thanks !
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
05/31/13 05:11 PM (10 years ago)
I've tried to investigate this for quite a while but couldn't come up with a better answer than "It depends on what phone you have." Some show one line, some show two lines, but what we really need is "Big Views" in notifications: http://developer.android.com/training/notify-user/expanded.html I'd think that this would require some rewriting of the current notification code. You'll also notice that this is only for Android 4.1 and above - "Big views were introduced in Android 4.1, and they're not supported on older devices."
 
Imagenparaweb
Aspiring developer
Profile
Posts: 121
Reg: Dec 13, 2011
Cordoba
1,210
like
06/03/13 04:37 AM (10 years ago)
Oh, I see.. :(
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.