Android account management and synchronization mechanism

Source: Internet
Author: User

In the use of the time, found that the establishment of their own independent account management, while in the contact, you can directly click to send information, see friends Circle and other functions, feel very convenient

And then did the related research, mainly from two aspects, carried on the research

1, the account management is the realization mechanism and synchronous implementation mode

This look: http://blog.csdn.net/swust_chenpeng/article/details/39401497

or directly: http://blog.csdn.net/w2865673691/article/details/37403147

http://blog.csdn.net/u010002056/article/details/9210157

2, about synchronous SyncAdapter

This main reference SDK in sample Samplesyncadapter

Errors that may be prompted for import:

Permission is a granted to system apps Android.permission.WRITE_SECURE_SETTINGS

Windows--Preferences, Android--Lint Error Checking.

In the list find a entry with ID = ProtectedPermission . Set the Severity to something lower than Error. This can still compile the project using Eclipse.

Http://stackoverflow.com/questions/13801984/permission-is-only-granted-to-system-app


http://blog.csdn.net/xjanker2/article/details/6146289

The last mention here, when uploading to Gae, may suggest that Moudle can not find: "One of the model Moudle found that you need to create a new __init__.py in the model empty file, to explain is a Python module, if you also encounter this problem, Hope to be of help to you. ”

But this project must be in line with the server side, and the server side needs to be built on Google app Engine, so you have to create a new app on Gae, and then remember AppID. This is because the samplesyncadapter_server -side code is based on Python implementations, all we go to https://developers.google.com/appengine/downloads# Google_app_engine_sdk_for_python download Google App Engine SDK for python download down to unzip, about its use, we can refer to the following:

Http://blog.sina.com.cn/s/blog_bd0b53180101e9rw.html

http://lampeter123.iteye.com/blog/390536

http://www.qrong.com/archives/495

http://ego008.iteye.com/blog/554757

Http://bbs.chinaunix.net/thread-1505938-1-1.html

It feels like it, just look at it, and then we use the Google_appengine directory (SDK installation directory) appcfg.py command to upload server-side code to GAE, command: appcfg.py update \workspace\ Authenticatoractivity\samplesyncadapter_server\ But when I upload this side of the old prompt error: appcfg.py:2416 An error occurred processing file ": HTTP Error 401:unauthorized. Aborting., do not know what reason, later in appcfg.py added a parameter--oauth2, specific reasons do not know, you can look under: Https://developers.google.com/appengine/docs/python /tools/uploadinganapp, after uploading successfully, we re-enter: Yourappid/appspot. COM our sample SyncAdapter page is out.



And then you can use it in conjunction with the client.

Finally want to in the contact, click an item, also can jump to the specified intent, we can again manifest.xml in the configuration:

<activity            android:name= ". Authenticator. Authenticatoractivity "            android:label=" @string/ui_activity_title "            android:theme=" @android: style/ Theme.dialog "            android:excludefromrecents=" true "            android:configchanges=" Orientation ">            < intent-filter>                 <action                    android:name= "Android.intent.action.VIEW"/>            <data                    android: Mimetype= "Vnd.android.cursor.item/vnd.samplesyncadapter.profile"/>                <category android:name= " Android.intent.category.DEFAULT "/>            </intent-filter>        </activity>


Be sure to add <category/> tags otherwise, the contact can not call the intent, this time click on the corresponding Minetype type, you will be able to jump to the corresponding activity

The contact person that synchronizes from age is read only, do not know what is going on???


The dialog box that pops up in the diagram is the activity (theme is dialog style) that hits the view profile.



Android account management and synchronization mechanism

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.