How to retrieve chat history from ejabberd using Strophe and Intel XDK? - chat

I am trying to understand how should I retrieve chat history from ejabberd between 2 users? I am using Strophe client and Intel XDK.
I am successfully sending the message, and the other user successfully receives the message. Also I have activated the mod_mam module, so I can see in my DB the entire conversation. My problem is, because I am developing a mobile app, and every time I exit the app, my conversation dissapears, what should I do to keep that conversation in my app even when I exit the app?

Related

Check if user turned off mobile data/wifi connection and update it to firebase

Hy. I am building a chat application in flutter and I want to show users last seen, offline and online status, using firebase as the backend. I complete all these active status things..like storing offline online and typing status. but the problem is if the user turns off the data while using the app the user active status is showing as online . Because he was using the app. So how can I change that status to offline, if the user turns off the internet connection from mobile .

how to get real time chat history using agora sdk

how can I get all pervious real chat history from agora server ,I develop code for messaging but when I close the app and reopen the app do not get any message from peer to peer messaging mechanism. Please suggest any idea about what can I do?

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?

Facebook chat in iPhone app with push notifications

We're planning an app which, among other things, is supposed to integrate a facebook chat.
We're discussing about the push notifications for receiving messages while the app's in background. What comes to mind is a proxy server for the chat, that'd actually connect to the facebook chat, and the iPhone app would connect to the proxy.
Then, it's easy to have the proxy server act as a push notification server.
Is this the only way to go, or are we making this more complex than it needs to be?
Any input is appreciated. Thanks.
To do push notification (App is closed, user receive a message and an alert appear on the iPhone), that's the only way, because every app need an unique certificate to send push notifications. This mean that official Facebook servers can't push for third-party applications. You need a proxy that keep a connection open to FB and push alerts to Apple's Push Notification Server when needed.
Inside the app, instead, you can connect directly by opening a socket to Facebook's servers and use a Jabber library for ObjC. This allows another approach: Local Notifications. They're similar to Push, but they doesn't need a proxy server: it's the application running on user's device that keep an open connection (even when the app is in background) with Chat Server.
This is the documentation that covers both type of notification: Local and Push Notification Programming Guide
Facebook's chat system is a Jabber server, so I think you are making it more complex than you need to.

making custom ads for iphone application?

i would like to display ads from my server in a uiwebview placed inside my application for which i will be sending some data from the phone to my server but what i have heard sending user data to your server in application will lead to the application being rejected?? is it true?? is there any other way to implement own custom ads from my server into the application??
That's not true, as long as your server aren't belong to some company in the mobile OS business.