Hi everyone,
I am going to make a small IM application, and I would like to know weather the concept is work or not:
1. A server with mysql, the table contain 2 columns, User and Content.
2. php file, 2 command inside which one for posting message content and other is getting the content of database.
3. In b4a app, a button which doing posting function with the edittext content by manual (just press the button and post content to mysql database).
4. Automatically doing the getting function to receive the content of database and show in the app (i.e. just clear and list content at listview every 5s or 10s).
My question is:
1. Does the concept work, or is it efficiency especially in point 4, since keep doing the getting function every 5s or 10s may waste the electricity of the phone a lot.
2. How can I achieve the auto-running function for send a command to get content?
3. Lastly, is it any other better way to do so, like doing Synchronization with mysql database when the there is new content entry in the database. Just like the whatsapp, we can get updater messages when we receive new message.
I am looking for any help. Thank you.
I am going to make a small IM application, and I would like to know weather the concept is work or not:
1. A server with mysql, the table contain 2 columns, User and Content.
2. php file, 2 command inside which one for posting message content and other is getting the content of database.
3. In b4a app, a button which doing posting function with the edittext content by manual (just press the button and post content to mysql database).
4. Automatically doing the getting function to receive the content of database and show in the app (i.e. just clear and list content at listview every 5s or 10s).
My question is:
1. Does the concept work, or is it efficiency especially in point 4, since keep doing the getting function every 5s or 10s may waste the electricity of the phone a lot.
2. How can I achieve the auto-running function for send a command to get content?
3. Lastly, is it any other better way to do so, like doing Synchronization with mysql database when the there is new content entry in the database. Just like the whatsapp, we can get updater messages when we receive new message.
I am looking for any help. Thank you.