Database export - Java for Android App Development

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...

Related

Backing Up Contact's?

I used the "Serch Fourm Threads" but there was nothing as specific as some one just explaining like 4-5 steps on how to do it..
I would really really appreciate it if some one can take like 10min out of there time to show me a program to use to back up my contatcs bc i need to hard-reset my phone, then once hard-reset do something and my contacts will be restored..
I use ppcpimbackup. It's free and it backs up most of the data on your cell phone (i.e., call logs, etc.)
reddhanky said:
I use ppcpimbackup. It's free and it backs up most of the data on your cell phone (i.e., call logs, etc.)
Click to expand...
Click to collapse
Get program, install it and make the backup file, "hard-reset" install the program again and open the backup file and it will apply my contacts to what they were?
Maybe you should check out this thread
http://forum.xda-developers.com/showthread.php?t=299705
Dashwire
I've been using a really neat online backup system called DashWire. Haven't messed with it all that much, but it basically installs a small application to your phone which then sends all contacts, text messages, videos, photos, etc. to your online account. I haven't tried restoring anything but it looks really cool. Oh, and it's free.
What i do is i use windows live, when i first got my phone i went to hotmail.com signed up for the email service for my phone only.
I put everyone email and other information in, i went to my phone and went to windows live sync and next thing u know all my contacts are on my phone. hope this helps
I use outlook.

How to add more than 15 favorite contacts ?

Hello,
There is a way to add more than 15 favorite contacts ?
It is a great feature but is limited to 15 contacts.
Many Thanks
This would be great if it's possible.
I have another question. How can i change the order of the favorite contacts?
Yeah, would also like to have more than 15 favorites. But maybe they made the limit because it would be too laggy otherwise ? Don't know really
Order of the contacts on people tab
I am also interested in changing the order of the contacts on my people tab. I have searched the site and this is the only reference found. Any update to this out there?
Thanks.
xponline said:
I am also interested in changing the order of the contacts on my people tab. I have searched the site and this is the only reference found. Any update to this out there?
Thanks.
Click to expand...
Click to collapse
As far as I'm aware your favourite contacts appear alphabetically and this order cannot be changed.
If I am wrong, I apologize. But to be honest I don't see a need for this anyway as the time taken to scroll to any of your favourite is Minuscule anyway
thanks for reply. Just wanted to have the wife at the top of the pile - keeps her happy
AAAJessica Alba
I have numbered the beginning of the name of my favorite contacts from 01 to 15. This way you can reorder them in the TouchFlo 3D tab.
This trick works for the all programs tab, but not sure for the people tab
Since--if--the order is alphabetical, try putting a space before the name, e.g. " Jessica Alba" instead of "Jessica Alba."
Any news or updates on this one?
Hi guys, anyone out there had any luck with adding more favourite contacts? Any knowledge to share about the people tab that might help us out?
I'm running Sense 2.5 from Leo 2.02, seems pretty quick on my own WM 6.5 28014 build, but would absolutely LOVE to have more than the standard allowance for favourite contacts
P.S In all the Sense 2.5 versions i've used I've been able to manually rearrange my favourite contacts - guess it's a 2.5 thing, but it is doable.
UP!
Any news for add more then 15 favorite contacts on HD2 ?
Thanks!
I'm also looking for that, not easy to decide which friends should be the unlucky 16th, 17th contacts
thanks
perchera said:
I'm also looking for that, not easy to decide which friends should be the unlucky 16th, 17th contacts
Click to expand...
Click to collapse
LOL
Fallen Spartan said:
As far as I'm aware your favourite contacts appear alphabetically
Click to expand...
Click to collapse
Absolutely not.
They simply appear in the order they were created, and when you restore them after a ROM flash (what I do often these days ), they obviously appear in the order they were historically created in the main contacts list (still not using alphabetical order).
This is ABSOLUTE CERTAINTY, is reproduced after each flash, and bears no discussion whatosever.
Fallen Spartan said:
and this order cannot be changed.
Click to expand...
Click to collapse
If I could find where they are stored (I think I'll ask people who wrote favorite contacts backup programs - though I'm a bit worried, as Zenyee's Back FavPeople Up seems to save and restore actually NOTHING ! ), then maybe I should be able to write some utility to do that...
I don't even know if they are stored in a database, an xml file... The only thing I'm sure of is they are not stored in the registry !
The only way now is to delete them then restart from scratch !
Fallen Spartan said:
But to be honest I don't see a need for this anyway as the time taken to scroll to any of your favourite is Minuscule anyway
Click to expand...
Click to collapse
It does't take any time actually if you use the 4x4 mod, as you even don't have to scroll.
But they're still messy anyway, making them not straightforward to click on.
I initially created them sorting professional and personal favorites... But, well, this nice order doesn't survive a ROM flash !
You must just be aware of the fact people just like their contacts to be sorted the way they want. In other words, they think THEY are the boss, not their phone ! LOL
Anyway, it's not forbidden to search for a way to change that, ask for help, and hopefully, find a solution.
I actually found this thread because I was precisely looking for that.
Ducati1979cc said:
I have numbered the beginning of the name of my favorite contacts from 01 to 15. This way you can reorder them in the TouchFlo 3D tab.
Click to expand...
Click to collapse
But it has no effect at all for the reason I explained before.
g2tl said:
This trick works for the all programs tab, but not sure for the people tab
Since--if--the order is alphabetical, try putting a space before the name, e.g. " Jessica Alba" instead of "Jessica Alba."
Click to expand...
Click to collapse
Same punishment !
OK, now I've managed to have Zenyee Back FavPeople Up actually saving something...
There is a very easy and simple way to sort the favorites using this tool.
Just edit the produced HTCcontact-backup.xml file, change the positions between the <FavoriteOrder> and </FavoriteOrder> tags, then restore it, and you're done !
Position numbers begin at 0, so the last one should numbered 14.
I'll now try to restore a modified xml file with a contact position modified to 15...
I'm also searching the registry for the key values enclosed between the tags <FavoriteContext> and </FavoriteContext> : will I be lucky ?
Edit : I'm not !
And trying to renumber a contact beyons the limit doesn't work either.
Z80-Man said:
OK, now I've managed to have Zenyee Back FavPeople Up actually saving something...
Click to expand...
Click to collapse
how did you manage to do that? i have an htc diamond2/topaz with the energy rom and back favpeople up! doesn't find any favourite contacts from my people tab :-(... i don't know why. it just says: backup completed; 0 contacts saved. it's really annoying having to add favourite contacts manually after each rom update.
Thanks for any suggestions!
OK, I looked further in the registry and in the contacts themselves (using Outlook on your PC can help, too).
The "Favorite" contacts are actually tagged as belonging to a group ! That's how Back FavPeople Up! works. The group is labelled "1", where not classified contacts are tagged "0".
I managed to have Back FavPeople Up! working by checking the "Sense 2.5" box (I tried previously without success, but now it works. It may actually depend on the ROM build, even if all of them use Sense 2.5).
On restoration, it sometimes doesn't restore them all, though.
Then I analysed the resulting file named HTCcontact-backup.xml.
It's actually a bit messy, because Zenyee din't add a carriage return between each section, but it still works if you add yours to improve readability... It's just XML, after all.
Here is its structure :
Code:
<?xml version="1.0"?>
<!--Backup of HTC Favorite Contacts by dzenkinz ([email protected])-->
<ContactList>
<Contact>
<FileAs>Usual Name</FileAs>
<FirstName>First Name</FirstName>
<LastName>Last Name</LastName>
<RingTonePath>RingTone Path</RingTonePath>
<FavoriteContext>Index Number</FavoriteContext>
<FavoriteOrder>Order Number</FavoriteOrder>
</Contact>
<Contact>
...
<Contact>
...
</ContactList>
The contents between the tags should be self-explanatory for most of them ; some of them need some more explanation, however.
- If a tag is empty, then the syntax is simplified. If for example you don't have a specific ringtone linked to the contact, then it will just be noted :
Code:
<RingTonePath />
The same applies to any other empty tag.
- The "Index Number" tag contains some index relating to the contact's position in the list. It's a 7 digits (decimal) number. I'll go back on it later.
- The "Order number" tag is the most interesting, as it represents the position in the favorite list ! It's a decimal number between 0 and 14.
- The "Usual Name" is the one showing in the "Favorite Contacts" tab. The other ones are just a copy of their real content in the "All People" full list.
Now with these informations, I just did what I always do... Search the registry with the "Contact Number", hoping I could find them... And... Bingo !
You can find a section named "FavoriteOrder" in the [HKEY_CURRENT_USER\Software\HTC\People\] key...
And this is what's in it :
Code:
[HKEY_CURRENT_USER\Software\HTC\People\FavoriteOrder]
"0"=dword:Index Number 1
"1"=dword:index number 2
...
So this is a list of each contact index number, stored in a DWORD variable representing its rank on the "Favorite Contacts" tab.
It actually works, as if you juste restore these registry keys then soft reset, you'll see your contacts displayed in the require order.
If you want to leave some empty buttons in order to sort them, then you'll just put the value 0 into the variable wearing the position number (remember they begin at 0, so "0" is the first, "1" is the second, etc.)
You should actually fill in the whole 15 variables (using the 0 value for empty ones), or you'll end up with buttons wearing an old contact on it.
Warning : For the index number, be careful on the base you will use : the numbers found in the XML file are written in decimal, while the registry numbers are naturally written in hexadecimal, so if you must manually copy a value, be sure you first check the "decimal" button.
Technically, you'll just export the [HKEY_CURRENT_USER\Software\HTC\People\FavoriteOrder] key from the registry, edit it with the notepad, sort the contacts to your taste, the import it back to the registry (you can make a CAB to ease the process).
The method still have some drawbacks and difficulties, howether, so please read carefully the following :
1) The [HKEY_CURRENT_USER\Software\HTC\People\FavoriteOrder] will be created only by Zenyee Back FavPeople Up! upon restoring previously saved contacts.
Though it's actually used by the HTC Favorite Contacts tab, it doesn't exist "naturally" !
So you'll have to restore a saved list first, or create the registry keys from scratch. Then you'll be able to export them, sort them to your taste and import them back.
2) There is an another limitation I found this morning. As you might expect, this tool is most useful after flashing a new ROM, when you want to get your favorite contacts back.
The problem is on the method you'll use to get back the full contacts list. maybe it won't be a problem for most people... But I had one.
Yesterday, when I flashed the last Energy ROM, something went wrong with my ActiveSync on my hom PC, and as I was downloading a Dinik version (it takes about 2h1/2 to get one ROM from Hotfile ! ), I couldn't reboot, so I synchronized my contacts this morning from my office PC...
And then the favortie contacts list I restored from the registry keys was all messed up.
The reason is simple : the index numbers were different from the ones that were saved.
I think the reason is my office Outlook file is actually a bit different from my home Outlook file. They are actually syncrhonized separately (of course ! ), so their databases grewn separately.
The other time I flashed, I resynced the contacts from home, so the list was saved according to the home contacts index list.
Then last flash, I resynced from the office, and tried to restore a list that was built from the home contacts list...
I actually don't know if the same could also happen if you still resync from the same PC... You'll have to try out.
But as long as you keep your contacts in your HD, you can freely export and import back the favorite list from and to the registry, and it will be fine.
Now I think that if you use antother method to save your contacts and restore them after a flash, for example if you use PIM backup or any other tool instead of synchronizing with Outlook, then maybe you won't have this problem at all, I don't know.
What i do to have my Fav contacts in tact after flash....
Before flash
Backup my contacts with pim backup
Backup fav contacts with Zenyee Back FavPeople (sense 2.5 checked)
Then after flash
Restore from pimbackup
Restore from Zenyee Back FavPeople and Reset when it will ask you (Importand).
This method is allways working for me in NRG roms
Yes, it works great, but there are some limits to what it can do :
1) If you already imported your saved favorites and let them in the order they came, saving and restoring them back with most probably keep this order.
However, if you rearrange them and save them again, then they'll be restored in the previous order.
Apparently, they are always restored in the chronological order they were created in the main list - something like that.
When they are saved, it's obvioulsy in this order. Zenyee actually scans the whole contacts database from top to bottom and saves the necessary information from the ones that are marked as belonging to group "1" while he encounters them. That's how it's done.
2) It will sometimes miss some contacts at restoration (and will display the warning). Don't ask me why. Maybe the ones I imported from the "Favorite People" tabs, as opposed to the ones I choosed in the main list, then use "Add to favorite" menu, since they might not have all the necessary information ? It actually looks like that.
In other words, Microsoft method seems to be more reliable than HTC method.
3) Beware if like me you're using 2 PCs, at work and at home, sharing the same Outlook information (information synchronized by ActiveSync, with new contacts added or deleted on one site, then synchronized with the HD, then synhronized again with the other PC, and not everyday, nor each time a change is made. So finally two somewhat different databases !)
Zenyee saves index numbers that refer to the current contacts database. That's the only way he actually links the saved data to the previously restored full contacts list.
If you happen to flash your ROM and restore your contacts from a different PC, restoring your favorites will then do a mess of them !
So I won't be so affirmative saying it will all restore to identical each time.
I could just say "it depends"...
Anyway, the method I explained above still relies on using Zenyee Back FavPeople Up! to restore your favorite in the first place (they'll be just in an incorrect order - or not : it depends, as I said above - with the spare icons at the end), as it's responsible for creating the registry keys.
It also requires you're NOT in case #3, or it won't work either !
Then you can import your previously saved registry data (taking care to fill in unused icons data with "0", or the previously restored favorite will still show in double).
After soft resetting, your favorite will then show in the exact order you saved them, including spare icons in the middle if you had any.
My suggestion doesn't replace what's already existing : it just completes it, ok ?

Accidentally deleted parthernship on WinMo - all contacts r gone

After "re-installing" my laptop I launched ActiveSync the first time and telled him to synchronize with my Touch HD. But AS said: There allready exists a parthernsip on the mobile device - first go and delete it.
Ok... I started AS on my phone, opened the options dialogue and I deleted the partnership with my laptop. That was a mistake - because with the parthnership every contact was deleted.
Wow, nice feature, Microsoft!
So... i know i have a half year old backup, but is it possible to undelete the current contacts? Perhaps there is a file on my phone, where they all are stored?
every hint is helpful, thanks a lot in advance!
//E
puuh.. ok - i found the file "pim.vol". Obviously it contains every contact but they are marked as "invisible" respectivly "deleted". So, how can i reveal them, make them visible?
Yes, I saw that issue when trying to remove association between my PC and my HD. I used ActiveSync to import contacts from PC, but when it's done, why can't I mantain the contacts if I remove the association? Can't understand.
Deleted as mis read the line of "re-installed" laptop.
Soz.
i guess it could be a good idea to move this thread to the general Q&A board, cause thats not really a blackstone related problem.
Also have the exact same issue,
used phone on my spare laptop and was asked to delete a setting,
Now I've lost about 220 contacts. - Any fixes?
I think there is no fix. Just dont do it again. Always have a backup somewhere. Now it is quite convenient to skip outlook altogether and active sync directly to gmail and gcalander.
perhaps there is a solution.
As I found out, the pim.vol is just a database called "EDB" that MS uses for mobile devices. Till now the file format is "closed" but there exists the so called "POOM" - an API to read informations from the EDB.
So... I guess there is someone out there who already coded a Interface to read the pim.vol.... and we have to find him...
This interests me because I tend to delete contacts quite often!
Just Run PPC PIM backup- it creates a backup of PIM on a daily basis. This way you can delete contacts,messages, appointments and so on as much as you like.

[Q] synchronization with my own cloud

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

Old school contacts...ing

So, this might seem like a very noobish qustion, but it's actually something that's been playing on my mind for a while... Like, since 2010...
I've been using what many of you will probably consider a stone-age way of managing my contacts ever since I got my fist android device, the mighty BLADE!!!
I'm not a fan of "helper apps", like Kies, or iTunes - Nor do I like being tied to a particular piece of software, that might not be present on a public computer if I need to access one in an emergency, or someone else's machine if I'm not at home, etc..
(Hell, I don't even like playlists; All my thousand plus MP3s are kept in a single folder, organised by artist & title in the filename itself, so that any media player I use always organises them properly, without having to maintain separate playlist files....)
So anyway, all this time, my way of maintaining my contacts has been to keep a copy of my contacts list in .CSV format on my SD Card.
When I add a new contact, I simply add a new line to the .CSV, enter the details between the correct commas, upload it to my gmail account & update my contacts there. Finally, I sync my phone's contacts to google to get the new contact on my phone.
This lets me edit my contacts in Notepad (no helper app, it's basically a text file just with a .CSV extension), and gives me a cloud-based backup in case of phone loss...
However, the act of updating the .CSV, upping it to google, and then syncing is quite cumbersome...
So I figured I'd ask if I'm the only one quite so OCD about how they manage their contacts off the device itself, and if so, if there's a more elegant way to do it, while keeping the need of 3rd party software to a minimum?
Something akin to a small standalone contacts manager for windows, that lets me edit my contacts on my PC, save them as a file that can be edited without any special software, and then push them to my device?
(but one that's not bloated and doesn't have a bunch of unnecessary "features", like file/media transfer, music player, etc...)
Hell, typing this out loud, I'm tempted to dust off my old copy of VB 6 & write a single-form, non-install windows program to simplify editing a .CSV file, to break it down into the fields and output to .CSV... The part where it bypasses uploading to google & pushes right to my phone would probably stump me though...
Or maybe there's a better method I've not thought of yet?
Anyway, sorry for the long-ish post! Thanks
I just use the contacts app's import/export feature.
But I don't think windows can open the file without a third-party program.

Categories

Resources