How do mobile apps store messages locally?

For some reason this is very difficult to find, but I am trying to make a messaging app using the Ionic Framework and MEAN stack but was wondering...

  1. What are the best practices to send and retrieve messages(socket.io or another node module) for a hybrid app?
  2. How should an app store these messages(sqllite or nosql) using Ionic?
  3. What format (Json?) should they be stored in for sorting and print retrieval on the chat screen?

Answers are much appreciated and links would be really help to further my own research.

well if you are doing a mean stack then you will be using a mongo database (M: Mongo, E: express, A: angular, N: node). Socket Io will be the best method I know of to send messages. You will store them on the Mongo DB. Since you will be using mongo DB you will be using Json format I:E: {user: "", Message: "", MSGID: ""}.

Some Links: https://github.com/DaftMonk/mean-chat https://www.airpair.com/ionic-framework/posts/ionic-socketio-chat-application-tutorial http://forum.ionicframework.com/t/demo-ionic-chat-app/13324