+ Reply to Thread
Results 1 to 16 of 16

app to sync contacts with google/outlook-csv....

This is a discussion on app to sync contacts with google/outlook-csv.... within the Modding & Development forums, part of the Meizu M8 category; i am trieng to make such an app. i wrote a little testapp to get access to the contacts.db but ...

  1. #1
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts

    app to sync contacts with google/outlook-csv....

    i am trieng to make such an app.
    i wrote a little testapp to get access to the contacts.db but i am not able to insert a row.

    so i tried to insert data with SQLite Database Browser.
    but it is not possible. when i trie to execute
    INSERT INTO ABPerson (ROWID, First ,Last, Name) VALUES(4, 'hugo', 'boss', 'hugo boss')
    i get: no such collation sequence: CHINESE_PINYIN

    if i klick on "new record" in the database browser i get:
    Error ading the record, make shure the table is selected.
    If the table contain fields declared as NOT NULL please select EDIT -> PREFERENCES and adjust the the default value for new records to insert an empty string.

    but this is also not possible.

    grrrrrrrr

  2. #2
    Valued Member
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    1,309
    Thanks
    249
    Thanked 200 Times in 145 Posts
    hmm, maybe it is some kind of codepage problem?
    probably you try to write UTF-8 encoded and they expect GBK
    Meizu M8 SE - FW 0.9.9.18 (dao89 n450) Dualboot LBE A11 Android 2.2

  3. #3
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts
    i do not think that it is an encoding problem. in a few tables i am able to write.
    i think it is anythink with relations between the tables.

    i am not shure if it is the correct way to write directly to the database. perhaps writing to the phonebook is better with the sdk???

    but i have never used the sdk, so i am not sure.

    perhaps someone can use any SQLite browser and tell me the sql command to insert a contact correctly.

  4. #4
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts
    ok the sdk only provides correct designed buttons and access to hardwarebuttons, screen-rotation and so on.
    but i can not find any class to access the contacts.
    so the only way will be via sql statements. but i am not able to insert rows. i can make new tables, and write to them but it is not possible (for me) to write to the correct tables.

  5. #5
    Member
    Join Date
    Apr 2009
    Posts
    116
    Thanks
    58
    Thanked 14 Times in 5 Posts
    If you could give me a link for downloading this SQLite browser I would give it a try later on...
    Last edited by Lil-rich; 01-09-2011 at 12:23 AM.

  6. #6
    Valued Member
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    1,309
    Thanks
    249
    Thanked 200 Times in 145 Posts
    Google finds it all:
    SQLite Database Browser
    Meizu M8 SE - FW 0.9.9.18 (dao89 n450) Dualboot LBE A11 Android 2.2

  7. 2 members have thanked Loonix:


  8. #7
    Member
    Join Date
    Apr 2009
    Posts
    116
    Thanks
    58
    Thanked 14 Times in 5 Posts
    I didn't know which one to use Thx for the link.

    The problem should be the collate (as the error already said). Unfortunately the program isn't working for me very well, I can't execute any queries...

    Try the following:
    Code:
    ALTER TABLE `ABPerson` MODIFY `Name` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
    
    INSERT INTO `ABPerson` (`ROWID`, `First`, `Last`, `Name`) VALUES (4, 'hugo', 'boss', 'hugo boss');
    The first query changes the collate-part. This query has to be executed once!

    Try it and please report back in if it worked... You should also try to use the DB with the phone again after the changes. I can't say if this change fucks up the whole contact manager
    Last edited by Lil-rich; 01-09-2011 at 12:23 AM.

  9. #8
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts
    Error: near "MODIFY": syntax error

    SQLite Query Language: ALTER TABLE

    SQLite supports a limited subset of ALTER TABLE. The ALTER TABLE command in SQLite allows the user to rename a table or to add a new column to an existing table. It is not possible to rename a column, remove a column, or add or remove constraints from a table.

    i use the sqlite command line tool

  10. #9
    Member
    Join Date
    Apr 2009
    Posts
    116
    Thanks
    58
    Thanked 14 Times in 5 Posts
    Hmm I think then the only possible solution is to delete the whole table and recreate it completely.

    If you are in need of help then write again in this thread. Gotta go now
    Last edited by Lil-rich; 01-09-2011 at 12:22 AM.

  11. #10
    Valued Member
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    1,309
    Thanks
    249
    Thanked 200 Times in 145 Posts
    you mean like 'check if i can add tables' -> 'cant' -> 'read all contacts', 'overwrite tabe', 'write new table with backed up contacts'
    Meizu M8 SE - FW 0.9.9.18 (dao89 n450) Dualboot LBE A11 Android 2.2

  12. #11
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts
    delete table if you can (i am not able to) => create same table => try sql statement INSERT .....

    if you are able to create ABPerson, ABPhone... so that it is possible to write to it youcan send me this contacts.db so that i am able to continue coding the app.

    but we should test the "new" contacts.db with a few entrys on the phone to see if there are any problems with the new database.

  13. #12
    Valued Member
    Join Date
    Sep 2009
    Location
    Germany
    Posts
    1,309
    Thanks
    249
    Thanked 200 Times in 145 Posts
    seems like there is a problem with SQLlight and the M8
    Google Translate
    or ist that your post? '^^
    Meizu M8 SE - FW 0.9.9.18 (dao89 n450) Dualboot LBE A11 Android 2.2

  14. #13
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts
    found this:

    Google Translate

    Meizu M8 PC Suite synchronization source (non-official non-download)


    To avoid unnecessary trouble, download not released, and are interested in can be developed with the stations to contact me.


    can someone who is registered at bbs contact this person to get the source?

  15. #14
    Junior Member
    Join Date
    Oct 2009
    Posts
    68
    Thanks
    6
    Thanked 2 Times in 2 Posts
    there is a topic about it. And the software look very good, but it's in chinese and we need a english version

  16. #15
    BPM
    BPM nincs online
    Member
    Join Date
    Aug 2009
    Location
    Austria
    Posts
    222
    Thanks
    44
    Thanked 10 Times in 10 Posts
    we need the source

  17. #16
    Passing By
    Join Date
    Jul 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BPM View Post
    we need the source
    Still no app for this?


 

Similar Threads

  1. Outlook contacts sync problem with new UI
    By fic423 in forum M8 Firmware
    Replies: 7
    Last Post: 11-04-2010, 11:25 AM
  2. Transfer Contacts / calender to Outlook
    By morpheus1977 in forum General Meizu M8
    Replies: 2
    Last Post: 05-01-2010, 07:31 AM
  3. Sync with outlook calendar - No location??
    By kach in forum General Meizu M8
    Replies: 1
    Last Post: 04-29-2010, 08:39 AM
  4. Sync contacts with Outlook?
    By kyre in forum General Meizu M8
    Replies: 4
    Last Post: 02-13-2010, 02:46 PM
  5. outlook calender sync - categories - bug or necessary
    By SNOOP_69 in forum General Meizu M8
    Replies: 0
    Last Post: 06-04-2009, 05:20 AM