Showing Badges in iPhone Hybrid Application - iphone

We are developing a hybrid iPhone application. It has a webview that loads some mobile website. Website requires user authentication and once user is authenticated we need to show badge count for unread messages.
We are looking to use Push Notification to show badge count but I am not sure how should we register for push notification dynamically once user log-in and de-register once user log-out.
I believe if we can have some way to invoke native class method through javascript then we can achieve it.
Please suggest.

It is very simple whenever user logged-in, post a entry into the db and send notification for the records entered into the db and when user logging-out delete the entry from db

Related

Can I send user notification after someone calls the user in Flutter?

I have just started to learn notifications in Flutter.
What I want to do is when someone calls user, I want to check callers number if it is not saved, send user some notification.
I can check if the caller's name is in contacts, but when user opens my app. Is there a way to make flutter app work in background, and whenever call happens my app checks if it was unsaved contact call, and if it was send user a notification.
Does someone how to achieve such thing?

How do I listen for a Facebook app uninstall?

When a Facebook user logins with our Facebook application we register him in our database as a member. But if, sometime in the future, the user wishes to not be a member of the application and uninstalls the app, how can I tell so we can remove him from our database? In other words, how can I learn of an uninstall so I can handle the event appropriately on our side?
If the user deauthorizes your app, Facebook „pings” the deauthorize callback you can specify in your app settings. That gives you a chance to to deal with this event accordingly on your server.

Tracking Facebook Apprequests on iphone

I have Facebook connect set up for my iphone app and am able to successfully send apprequests. What I want to do is track whenever an apprequest recipient clicks the notification to either install my app or open my app.
When the recipient already has the app installed, I can track that they opened the app from Facebook by looking at the URL in the 'application openURL' method in AppDelegate. But if the recipient does not have my app installed, clicking the notification brings them to the app store to install my app. Is there anyway for me to track that this install came from a FB apprequest? Or assuming they do NOT install my app, is there a way for me to track that?
Thank you very much for any help.
As of 5/22/2012, there is no way to accurately track installs coming from Facebook, because iTunes will truncate the URL. This was confirmed for me by a FB employee.
A rough workaround is to save all the fbuids that are sent requests for the past X hours or so. If anyone using your app FB connects within that time frame with a matching fbuid, you just assume the install came from the original FB request.

Send a message between application users

I want to write a facebook app in which I'll show a list of the people who gave permission to use the app.
Each user would be able to pick another user from the list and send them a message from the app.
Is there any facebook api call I can use? Or I have to develop a stand alone messaging system?

Background process to alert the user in iphone?

I am developing a iphone uiwebview based application to load an web application url by getting the user credential from a login screen,as i have username and password which are required to communicate with the server on the other end with web services,i want to make an
alert with some data to the user once after he logged into application.
But can i able to give that alert even he closes my application if then please suggest me how to do so?
I mean can i run any background service that can allow me to communicate some server with webservice calls and alert the user?
Thanks in advance......
If I understand your question right, you need to implement a push notification service for your app. Did you have a look at Apples documentation on local and push notifications? http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
Or have a look at thee WWDC Video about it on iTunes.