openGeeksLab / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

RFE: support for *local* notifications #298

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Local notifications allow your app to show popups or reminders initiated 
locally by the app, contrary to push notifications that require internet access 
to a central server.  

Local notifications are extremely useful for all kinds of notifications to the 
end user, eg "It is 21:25, your favorite TV show starts in 5 minutes", or "Your 
background download has finally finished". A wide range of apps use local 
notifications. 

Described for iOIS here:

http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Concept
ual/RemoteNotificationsPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP4
0008194-CH1-SW1

Original issue reported on code.google.com by ch.hj...@gmail.com on 18 Aug 2012 at 8:32

GoogleCodeExporter commented 9 years ago
We already have a notifications API. This is more like a wakeup API (different 
thing). Chen can you please investigate whats available on various platforms 
and how/if it should integrate with the existing notifications API?

Original comment by shai.almog on 19 Aug 2012 at 6:01

GoogleCodeExporter commented 9 years ago
The current notification API is good for 90% of the use-cases, when the 
application runs in the background and would like to notify the user something 
has happened and he needs to open the app.

At the moment there is such API implemented on android: 
Display.getInstance().notifyStatusBar(...)

The same can be implemented for IOS

Original comment by cf27...@gmail.com on 30 Aug 2012 at 7:37

GoogleCodeExporter commented 9 years ago
I don't think that's true for iOS where background execution isn't supported. 
I'll take this issue on.

Original comment by shai.almog on 30 Aug 2012 at 8:55

GoogleCodeExporter commented 9 years ago
For Android, does this mean the application needs to always be running in order 
for notifications to work?

Original comment by ThornM...@gmail.com on 11 Feb 2013 at 10:31

GoogleCodeExporter commented 9 years ago
Yes. We consider this issue still open for iOS as well.
The issue doesn't refer to visual notification (as Chen's comment suggested) 
but both visual and "logical" notifications which will allow an application to 
wake up from a non-running state at a given time.

Original comment by shai.almog on 12 Feb 2013 at 6:38

GoogleCodeExporter commented 9 years ago
Do we have an ETA for when this feature might be included in codenameone?

Original comment by ThornM...@gmail.com on 12 Feb 2013 at 1:02

GoogleCodeExporter commented 9 years ago
We don't currently have an ETA for this. We generally determine priorities 
based on requirements pushed down by Enterprise/Pro subscribers or major code 
contributors and we just didn't get any such requests. 

Original comment by shai.almog on 13 Feb 2013 at 8:25

GoogleCodeExporter commented 9 years ago
Has this been done for iOS yet? The notifyStatusBar works like a charm for 
Android but not for iOS. Really need it to work for iOS. Is there an 
alternative?

Original comment by viplav.f...@gmail.com on 20 Jul 2013 at 12:23

GoogleCodeExporter commented 9 years ago
iOS doesn't have background execution in the sense that Android does so this 
sort of feature won't make sense (and isn't a good practice in Android either). 

Original comment by shai.almog on 20 Jul 2013 at 8:10

GoogleCodeExporter commented 9 years ago
Why are local notification not good practice on Android? Is there a better way 
to accomplish the same thing?

Original comment by ThornM...@gmail.com on 20 Jul 2013 at 12:23

GoogleCodeExporter commented 9 years ago
I am just talking about the status notification that just about every 
application does, on both android and iOS. Is there anyway to do it on iOS with 
codenameone? This is becoming a shows stopper for me.

Original comment by viplav.f...@gmail.com on 20 Jul 2013 at 5:26

GoogleCodeExporter commented 9 years ago
Notifications don't make sense without background execution and that is the 
crux of the bigger issue here. 

Original comment by shai.almog on 20 Jul 2013 at 5:28

GoogleCodeExporter commented 9 years ago
Ok. So how are all these other apps on iOS able to run in the background? Also, 
is codenameone generating an HTML5, JavaScript app (like phonegap) for iOS, or 
is it truly native? The UI feels a little flaky on iOS although on Android it 
feels just like when developed with android sdk.

Original comment by viplav.f...@gmail.com on 20 Jul 2013 at 5:46

GoogleCodeExporter commented 9 years ago
"In the sense that android does". It has something very different. Doing this 
while maintaining portability is hard.
I suggest turning to the discussion forum for questions/discussions. Codename 
One doesn't use HTML5 you can see the full source code in the repository 
including the iOS port source.

Original comment by shai.almog on 21 Jul 2013 at 7:27

GoogleCodeExporter commented 9 years ago
So is there anyway to invoke the status bar notification in iOS by perhaps 
using the NativeInterface and calling some underlying class in Obj-C?

Original comment by viplav.f...@gmail.com on 29 Jul 2013 at 3:28

GoogleCodeExporter commented 9 years ago
As I explained this isn't the issue. iOS KILLS your app after 10 minutes in the 
background. No excuses.
There is no such thing as arbitrary background execution in iOS, only use case 
based background execution.

Original comment by shai.almog on 29 Jul 2013 at 4:52

GoogleCodeExporter commented 9 years ago
Ok. How will push notification work with iOS? Say I have a chat app and I need 
to notify the user that they have a new message.

Original comment by viplav.f...@gmail.com on 29 Jul 2013 at 7:35

GoogleCodeExporter commented 9 years ago
This discussion is a bit off topic by now. Push notification is documented in 
Codename One and in the blog. I suggest you followup in the discussion forum 
and not in the issue tracker.

Original comment by shai.almog on 31 Jul 2013 at 12:28