[Q] synchronization with my own cloud - Android Software Development

I'm trying to add a synchronization function to my app which will work like this :
I want it to be login free, so no new account will be needed.
The data will be assigned to the user's google account on which he's logged in.
On server side, there will be a mySQL database wich will hold the user's data.
I didn't find a useful tutorial. This one uses some weird servlet or whatever, and the official google tut is very briefly explained.
Could anyone help me ?

halp meh plz

I was also trying to find a tutorial for something like this a while ago. Theres not much out there. Seems need to know how to write your own server side code to handle the synchronising and then communicate with the app through https or whatever.

Well, that doesn't help me very much. I know php/mySQL as well. I could imagine synchronization through xml - like implementing a function that would create an xml file from my database, upload it to the server and parse it/put it my online database.
This would be useful, if I only wanted to be able to modify data on one end - the phone - but then it wouldn't be called syncing, rather backup.
Or maybe I could request a similar xml file from the server. I think it should be possible to send some kind of query from the device to the server which would call a function that creates an xml file from database entries and then download the created file, parse it, compare with the device's database and update the database if some file was updated (it's 'last edited' time was changed).
So on each sync cycle I would first get the server-side xml file, update the local DB, then create the xml file from local DB, send it to the server and update the online DB. Only files with newer "last edited" time would be updated.
What do you think ?

Who the hell if not you, guys, can help me ?

bumpity bump

Related

Automated purge of ActiveSync email?

My back is against the wall, and I'm hoping someone has a creative idea on how to do this...
I am looking for a way to purge the ActiveSync email from a Windows Mobile 5/6 device through a combination of registry or file system settings, or perhaps some application, ie. something I could do with MortScript. Deleting the PIM data (calendar, contacts, tasks) is trivial...rename the pim.vol file, force a reboot, and have another Mortscript file waiting in \Windows\StartUp to then delete the old file. Email, on the other hand, is really, really hard. You can delete the email bodies and attachments in \Windows\Messaging, but the index remains in cemail.vol. I've read about one technique to outright delete cemail.vol, but this database also houses SMS messages, making this a bad idea.
Then I found the Registry value ClientReset, located in HKCU\Software\Microsoft\ActiveSync\Partners\{GUID}, which does exactly what I want...except that it doesn't have an effect when the program that stored the email was written instead by a third party, and just borrowing the ActiveSync message store. I can set up an ActiveSync connection, wait until it starts to sync, cancel it, then make sure ClientReset=1, and re-sync...but the purpose of the project is to automate the process. It seems ActiveSync is looking in one of the *.vol files for its cue to obey ClientReset, but even if I could find the value, folder, whatever, I know of no way to change the databases through scripting.
Has anybody been able to do this, or does anyone have ideas?
Many thanks for your suggestions!
Todd

[Q] [APP/Q] location based email fetching

with my SGS and android 2.2.1 i am happy in general but what i am missing is
a scheduling mechanism that can interpret if it has to fetch mail based on time and location (cell. not GPS).
let's say you don't want the phone to fetch mail when you are at home/work or otherwise you don't want it to do when you are not within a specific cell.
for the accounts that can be received from AccountManager this is no problem, but i can't get access to that ones that are stored in the emailer (POP/IMAP). (unfortunately what i am using most is POP and IMAP...)
also i'd love to have a "refresh all" button that can fetch mails from all the accounts immediately.
first of all:
does this kind of app/service already exist?
if not:
is it possible to get access to the accounts from the emailer via the API?
and if not:
where and how does the emailer store its data? is it readable anyhow?
edit: yes it is readable
providers are stored here: /data/data/com.android.email/databases/EmailProvider.db
passwords are stored in plain text!
edit: one way for accessing via AccountManager would be to implement Sync-Adapters for POP/IMAP
http://developer.android.com/resources/samples/SampleSyncAdapter/index.html
bennson

[Q] Newbie developing: How to host/share an SQLite Database online?

Hi!
I'm rather newbie developing for Android, and I'm kind of lost...but here goes what I'd like to do:
I'd like my app to have a local database that is updated from online, either downloading a new file each time versions don't match (which I find hard), or somehow to download/upload the latest insertions to an online file.
I'd like it to work somehow offline allowing to sync anytime that there's connection, so I'd like a local DB where the query is made, but I also want it to be synced as much as I can. Users should also be able to add new rows to the table, that could be done at any time the user decides to sync.
So...How can I implement an online database? And also, as a sidenote...Where could I host my DB? Is there any free hosting I could rely on? In my opinion it should be a rather small DB...
Thank you!

Database export

Hello to all.
I have been developing for windows for a long time but now i want to start at android too but need urgent an apk tool to export records from a database.
This is my cenario:
I have pink messenger installed in a phone that i use to track my childs chats.
Pink messenger has a database named threads_db with a table named nessages that holds the chats.
Every 10 seconds that table is updated from what it finds online at facebook server so even if i go offline i can still see chat history. The only bad think is that if my kid delete a thread from facebook pink messenger auto delete the thread from database also so i am loosing the history.
What i need is a simple tool to keep checking the table for new records and when a new one is found to be added to another database that has the exact same structure with the original. That way tool will add records to the second one that will never loose when deleted from first one.
It would be easy i think for this operation to be performed as the table has a unique key that names msg_id so a select statement can take place and update the second database only with new records.
I am willing to pay something for that tool also.
Thank you.
johntrk said:
Hello to all.
I have been developing for windows for a long time but now i want to start at android too but need urgent an apk tool to export records from a database.
This is my cenario:
I have pink messenger installed in a phone that i use to track my childs chats.
Pink messenger has a database named threads_db with a table named nessages that holds the chats.
Every 10 seconds that table is updated from what it finds online at facebook server so even if i go offline i can still see chat history. The only bad think is that if my kid delete a thread from facebook pink messenger auto delete the thread from database also so i am loosing the history.
What i need is a simple tool to keep checking the table for new records and when a new one is found to be added to another database that has the exact same structure with the original. That way tool will add records to the second one that will never loose when deleted from first one.
It would be easy i think for this operation to be performed as the table has a unique key that names msg_id so a select statement can take place and update the second database only with new records.
I am willing to pay something for that tool also.
Thank you.
Click to expand...
Click to collapse
Have you rooted your device ?
If yes than use titanium backup and schedule automatic backup so that it will take automatically backup and if you lose your data than restore it...

Best approach for loading website data into android app (without webview)?

Hi,
I am wondering what possible ways would be for loading a simple website into my app. My first thought is using a WebView, but I would like a dynamic app, while webview takes some time when loading between pages and links.
Is a common solution to load the html resources locally, from let say the assets folder? Than I could use AsyncTask to keep the files up to date and whenever the app starts it would load and work much quickly.
Or should I use HTTP Requests and parse the external Html document?
What would be the most situable solution for this kind of app?
Thanks,
Ved
vedtam said:
Hi,
I am wondering what possible ways would be for loading a simple website into my app. My first thought is using a WebView, but I would like a dynamic app, while webview takes some time when loading between pages and links.
Is a common solution to load the html resources locally, from let say the assets folder? Than I could use AsyncTask to keep the files up to date and whenever the app starts it would load and work much quickly.
Or should I use HTTP Requests and parse the external Html document?
What would be the most situable solution for this kind of app?
Thanks,
Ved
Click to expand...
Click to collapse
I think it's probably a decision best made by yourself. You have not said what type of data ? Cause really you should be wanting the minimal amount required. My app uses lots of data from my server for things like themes, but these come direct from SQL Database
deanwray said:
I think it's probably a decision best made by yourself. You have not said what type of data ? Cause really you should be wanting the minimal amount required. My app uses lots of data from my server for things like themes, but these come direct from SQL Database
Click to expand...
Click to collapse
Hi deanwray,
Thanks for your reply. I made some more researching and I have realised that my best bet is SQL, as you said.
Do you request data in your app directly from the online mySql database generally? I have read about a technique on downloading the data from the online database and converting it to SQLite (which is the local database on android) inside the application. This would be really cool, would really boost performance.
ved.
vedtam said:
Hi deanwray,
Thanks for your reply. I made some more researching and I have realised that my best bet is SQL, as you said.
Do you request data in your app directly from the online mySql database generally? I have read about a technique on downloading the data from the online database and converting it to SQLite (which is the local database on android) inside the application. This would be really cool, would really boost performance.
ved.
Click to expand...
Click to collapse
well my app uses a hosted database for
Online Theme Data (thumbnails store in just web space)
Settings Overrides (settings that I may have to force on the app)
Announcements ( Messages that trigger dialogs, adverts, html boxes)
Purchase info
other stuff that I forget
Any database that I access online I cache data local in cache sqlite database
So lets say the most complex things is the purchase list... a rough flow is as follows :
Get idents from online purchasable list
get descriptions and titles from idents
store local database
Simultaneous query of google IAP data from play to get locale info and pricing (along with IAP ident)
Store that in same local db
Display to user at, initial data, updated data and price additions
The database online is accessed via php (not a fan of that but hey ho, not really a programmer so there ya go) and given to the app as encoded JSON
I'm currently considering an ORM system like greenDAO or something like that...but not looked too much into it currently.
The themes database is quite good as it hold descriptions of views, shading, dimensions etc, these too are never displayed to the user from the server, but are cached local, cause failure of internet and failure of sync should not prevent any vital parts of what appears to be an offline app from working (e.g. my Smart SMS app)
Hope that helps, I could pass you the php although tis quite simple, there are security issues to look out for though
deanwray said:
well my app uses a hosted database for
Online Theme Data (thumbnails store in just web space)
Settings Overrides (settings that I may have to force on the app)
Announcements ( Messages that trigger dialogs, adverts, html boxes)
Purchase info
other stuff that I forget
Any database that I access online I cache data local in cache sqlite database
So lets say the most complex things is the purchase list... a rough flow is as follows :
Get idents from online purchasable list
get descriptions and titles from idents
store local database
Simultaneous query of google IAP data from play to get locale info and pricing (along with IAP ident)
Store that in same local db
Display to user at, initial data, updated data and price additions
The database online is accessed via php (not a fan of that but hey ho, not really a programmer so there ya go) and given to the app as encoded JSON
I'm currently considering an ORM system like greenDAO or something like that...but not looked too much into it currently.
The themes database is quite good as it hold descriptions of views, shading, dimensions etc, these too are never displayed to the user from the server, but are cached local, cause failure of internet and failure of sync should not prevent any vital parts of what appears to be an offline app from working (e.g. my Smart SMS app)
Hope that helps, I could pass you the php although tis quite simple, there are security issues to look out for though
Click to expand...
Click to collapse
Thanks for the details! It was really useful to see your workflow, I was not sure about the direction I should choose for my app development, but now is much clearer.
Thanks!
ved
Hy deanwray,
I could use a litle help, regarding the methods you have adopted for synchronising your online database with your apps local database.
I have reached a point where my database is ready, I am parsing (via JSON) data from a local xml file, and inserting it into my SQLite database. Everything works ok, but I need to get the data from my online mySql server into my app on a regular basis.
I have found threads wich mentiones the Android sync adapter, and others where people use the HTTPClient to pass data to/from the server. To be hones I am a bit confused, I would really glad if you could light me up on what would be the best approach, or what works for you the best
Thanks!!
vedtam said:
Hy deanwray,
I could use a litle help, regarding the methods you have adopted for synchronising your online database with your apps local database.
I have reached a point where my database is ready, I am parsing (via JSON) data from a local xml file, and inserting it into my SQLite database. Everything works ok, but I need to get the data from my online mySql server into my app on a regular basis.
I have found threads wich mentiones the Android sync adapter, and others where people use the HTTPClient to pass data to/from the server. To be hones I am a bit confused, I would really glad if you could light me up on what would be the best approach, or what works for you the best
Thanks!!
Click to expand...
Click to collapse
If you want do operate online database server then generally php is used.there is a tutorial on androidhive check it . you will get the answer
Sent from my GT-S5570 using XDA Premium 4 mobile app
vedtam said:
Hy deanwray,
I could use a litle help, regarding the methods you have adopted for synchronising your online database with your apps local database.
I have reached a point where my database is ready, I am parsing (via JSON) data from a local xml file, and inserting it into my SQLite database. Everything works ok, but I need to get the data from my online mySql server into my app on a regular basis.
I have found threads wich mentiones the Android sync adapter, and others where people use the HTTPClient to pass data to/from the server. To be hones I am a bit confused, I would really glad if you could light me up on what would be the best approach, or what works for you the best
Thanks!!
Click to expand...
Click to collapse
if you need a real time chat hit me up on hangouts https://plus.google.com/+DeanWray/

Categories

Resources