Android :: SyncAdapter Use Case ?

Sep 8, 2010

What we are doing currently? We have some structured, textual data on a server which is exposed using web services(RESTful). My application polls this server regularly(AlarmManagerService) to fetch the data and save it on local database(sqlite). Also, a user is authenticated and authorized beforehand for access.

Questions: There is a SyncAdapter/AccountManager class in the SDK and I was wondering if it can be of any use in my application to achieve the syncing mentioned above? If yes, what sort of infrastructure is needed at back end to support a sync set up using this adapter? Links to articles etc. that give details of using this adapter and other info is appreciated.

Android :: SyncAdapter use case ?


Android :: Contacts SyncAdapter ?

Dec 14, 2009

I've implemented a SyncAdapter correctly registered through the application manifest which allows to sync contacts with our backend. The sync requests are correctly sent to the SyncAdapter but actually I have a couple of dubts:

1) How a client (the object which calls requestSync of a specific authority) can be notified about the current status of the sync request, e.g. if the request has been correctly performed, is still pending, or is aborted for any reason?

2) I saw the addStatusChangeListener method in ContentResolver class but there is no documentation about that. Can someone clarify the correct usage of this? What kind of events can I listen?

3) What is the SyncContext ??

Onother issue is that after I've added my custom account to the device I saw that when the user selects to add a contact to that account, only the name fields are present in the "new contact" activity, no phones emails etc. Can someone tell me if (and how) it is possible to show all the standard fields that are actually showed to the user, even if no accounts exist on the device?

View 5 Replies View Related

Android :: AccountManager Without A SyncAdapter?

Jun 21, 2010

I'm trying to use AccountManager to store account information and have implemented an authenticator, but I keep getting exceptions like the below that crash the phone. Comparing with sample code this seems to be because I don't have (or particularly want) a SyncAdapter and associated service. Is there a trick to using AccountManager without adding a SyncAdapter?

CODE:.................

View 4 Replies View Related

Android :: SyncAdapter Using A Google Account

May 31, 2010

I have written a SyncAdapter that takes a "com.google" account and performs a sync with an appengine web service. Testing this with the dev tools sync tester (on the emulator), this sync appears to work just fine.

The problem is, it's not syncing by default. And going to the account in "accounts & sync" shows my google account to be blank - as if there's no sync services available.

I suspect that in order to get my sync shown in the "accounts & sync" menu, I'd need to implement my own AccountAuthenticator that would do exactly the same thing as what I presume google's AccountAuthenticator must already do. This is not an exciting job, and it seems very unnecessary. So:

Is there a way to add an entry to the "accounts & sync" menu that uses my SyncAdapter but relies on a google account? or to add a sub-menu to google accounts that enables sync of my appengine service? if not,is there a way I can re-use google's AccountAuthenticator from within an AccountAuthenticator I write?

View 1 Replies View Related

Android :: Unable To Edit SyncAdapter Contacts

Apr 5, 2010

Actually i tried the SampleSyncAdapter (Sample Sync Adapter examples), its working fine for me. but i am not able to edit/delete the synced contacts. Is this possible to edit those contacts ? please let me know.

View 3 Replies View Related

Android :: Syncadapter Using Google Account And App Engine

Oct 6, 2010

I am writing a syncadapter using google account and app engine. The account appears in account and sync, but when I try to select the account for syncing, I am getting a hard database error. I am trying to figure if this error is on mobile or the app engine. Further, what can be causing this error. Another error that I am getting is failed to find provider info.

View 1 Replies View Related

Android :: Using SyncAdapter For Syncing Application Data

Jun 23, 2010

I was wondering if a custom sync adapter would be appropriate when syncing "normal" application data that is tied to a Google account. For example, I'd like to sync some data to a Google docs spreadsheet in this case. Would a sync adapter be the right choice for this use case or should I handle the sync in the app?

View 5 Replies View Related

HTC Droid Eris :: Use Skin/case-Don't Use Skin/case

Jun 4, 2010

And how many people use a skin or case, or even screen protector. Personally, I won't leave the house without my otterbox commuter case on, I just feel like it would be for me to leave me house without clothes on, Dones't feel right.

View 45 Replies View Related

Android :: SQL Case Sensitivity Between 2.1 And 2.2

Nov 8, 2010

Is there any reason why SQL became case sensitive with Froyo (2.2)? I was tracking down why I have an Error reported which doesn't occur on my 2.1 phone nor on earlier OS version emulation with SimpleCursorAdapter.My bad was that between two selectable databases that one had lower case fields and the other that fields in uppercase. Usually this would make no difference with SQL as it is supposed to be case insensitive according to my investigations.

View 4 Replies View Related

Android :: Can't Run Some Test Case In Instrumentation

Dec 8, 2009

I have added the "android.test.runner" user library and "android.test.InsturmentationTestRunner" in instrumentation. But when i run the test in Instrumentation, 0 test has been run.

My test class is as below: package com.android.ProjectTest.test;

CODE:................

View 2 Replies View Related

Android :: ArrayList & Contains() - Case Insensitive

Jun 8, 2010

I want the contains() method from ArrayList to be case insensitive. Is there any way?

View 1 Replies View Related

Android :: Can I Do Switch Case On String

Sep 24, 2009

Can I do a switch(String), case (compare with other string) and how?

I am trying to compare string results and perform actions...

View 3 Replies View Related

Android :: ListView Special Case ?

Sep 11, 2009

I have a ListView, and I want to do something special with the first item in the listview.

So, I setup an adapter, an item in separate xml a java wrapper for the item and I have a "render()" method.

Inside my render method, I realized that I can't do something like "findViewById(R.id.test)" because all the items in the listview have the same id. How can I get just the first item?

View 2 Replies View Related

Android :: Problem In Running Test Case

Oct 20, 2010

I am working on android automation ,and i am new to this field , i went through the test example available at developer site and i am getting

11-05 14:43:14.509: WARN/TestGrouping(1485): Invalid Package: '' could not be found or has no tests

as error on running this code .

CODE:.................

View 2 Replies View Related

Android :: Abort Instrumentation Test Case

Feb 11, 2009

I have an instrumentation test case that is waiting for an incoming call. I would like to abort this test case after some time from outside of this test case. Is there any argument to "adb shell am instrument" command that will stop the on going instrument test case?

View 2 Replies View Related

Android :: How To Get A Hard Case For Motorola Droid?

Jan 18, 2010

I recently purchase one off Ebay ( admittedly a cheap one), and of course, I am not satisfied.The exposed edges weren't even black. It's going back. Can anyone suggest a specific one that they have experience with, and where they purchased it?

View 2 Replies View Related

Android :: Author Unit Test Case

Oct 23, 2009

I have downloaded donut branch and build for emulator. I am running the author test case in the following way cd /data;test_pvauthorengine -test 5 5 -video yuvtestinput.yuv - videoconfigfile mp4_config.cfg -audio amrtestinput.amr - audioconfigfile amr_config.cfg -output mp4.3gp Starting Test 5: AMR & YUV to AV using M4V Encoder .3gp Test PVSCHED:Scheduler 'PVAuthorEngineTestScheduler', Thread 0xafe43c24: Error! AO PvmiMIOFileInput Error 101 not handled PVSCHED:Scheduler 'PVAuthorEngineTestScheduler', Thread 0xafe43c24: Error! Reason 101

View 3 Replies View Related

Android :: Switch/case Statement Syntax?

Nov 7, 2010

I need some help with switch/case statement syntax. im trying to use onClick to have different buttons do different things. i have the first one working. it just uses an intent to start a new activity. for the next button, i want it to open a specific url looks like this so far

CODE:..............

How do i get the engadget_button to open engadget.com?

Is it just something like this:

CODE:....................

View 1 Replies View Related

Android :: Free Nexus Neoprene Case?

Mar 8, 2010

Does anyone have one they can send me?

View 3 Replies View Related

Android :: How To Build Ctsand To Add And Run Your Test Case

May 13, 2010

From 2.0 the cts is freely downloadable from android's repository.

But there is no documents about it.

Does anyone can tell me:

How to build cts? Is there a standard procedure? How to run cts? How to add customized test case?

Here, share my experience. After repo sync all source, you can't directly run "make" to build all source.
You will get some errors.

Now, I'am trying to first build android source without cts, and then build cts alone.

Also, here are some reference for run cts:

http://i-miss-erin.blogspot.com/2010/05/how-to-add-test-plan-package-to-android.html
www.mentby.com/chenny/how-does-cts-work-where-can-i-get-the-test-streams.html
www.jxva.com/?act=blog!article&articleId=157

1st time Update @ 5-13 18:39 +8:00

I do the following steps:

1.build android source without cts (move cts out of the $SDK_ROOT).

2.build cts (move cts back).

both jdk1.5 and 1.6 have the following errors:

CODE:.....................

View 1 Replies View Related

Android : Letter Case Inconsistency Between Src And Res/layout

Mar 17, 2010

I called my main activity Main, and Eclipse created Main.java and res/layout/main.xml for the layout.

Is there any reason why Eclipse dropped the uppercase "M" for the layout file?

Was I wrong to use upper case M for the name of my Main class (a Java convention, types start with uppercase, objects with lower case)?

View 2 Replies View Related

Failed Android Test Case With Nullpointer

Mar 18, 2012

I am adding an android testcase for the UI. I have been following the tuto for the Spinner Test.Unfortunately I have a nullpointerexception on a object medtSalePercent.setText("10"); which has been initialised.

Code:
import jle.base.WorkActivity;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.EditText;
import android.widget.TextView;
[code]...

There is no exception on medtPriceValue.setText("50");.but there is one on the screen for medtSalePercent.setText("10");

View 4 Replies View Related

Android :: Screen Was Black Case - Service Sleep

Sep 21, 2009

I wrote a service and I registered BroadcastReceiver in it. In the onReceive () method of BroadcastReceiver catagory,I just wrote Intent.ACTION_TIME_TICK.equals(intent.getAction()) to receive the systenm time every minute and deal with everything that I should do in it every minute.But i found a problem that when the mobile phone screen was locked and was completely black,my service seems to be sleep and does not work,and when I light up the screen(it is still in locked condition),the system will automatically run my service.I do not know the reason,I guess if it is because my service is not the system-level service? When the mobile screen is black,Andraid system will hibernate the sevice which is not the system-level service,so if this,I should add my service to system service,but I know how to use android.permission.ADD_SYSTEM_SERVICE? If you can,please send me a example about how to add own service to system-level service.This problem has been troubled me for two weeks.

View 2 Replies View Related

Android :: Activity In Case Of Incoming Phone Call?

Mar 12, 2010

I want to know that what will happen to my activity incase of an incoming phone call? Will the state of my activity be saved or I have to explicitly save it? Another question is that will the activity resume after the call is disconnected?

View 3 Replies View Related

Android :: Start / Bind A Service From Test Case?

Sep 8, 2009

How to start/bind a service from a test case. I tried using the ServiceTestCase and somehow I am getting the context as null and the test is not launching/starting the service.

View 2 Replies View Related

Android : Changing CharSequence First Letter To Upper Case

Jun 23, 2010

It may seem simple but it posses lots of bugs

I tried this way:

CODE:............

And it throws an exception

Another try i had was :

CODE

This one also throws an Exception

View 2 Replies View Related

Android :: Pass Bundle To An Activity On An Instrumentation Test Case

Jan 29, 2009

When implementing an ActivityInstrumentationTestCase, how do you start the activity with a Bundle of saved state?

View 2 Replies View Related

Android :: Running Junit Test Case For APIDemo In Eclipse?

Jan 28, 2009

I am trying to run Junit test case for the android APIDemo project under eclipse. I create an eclipse project from the APIDemo source, it compiles fine and then I did: 1. Debug->Run as Junit tests

But I get this error: 'Lanuching AllTests' has encountered a problem. Cannot connect to VM...................

View 9 Replies View Related

Android :: Error Occur When Try To Run Junit Test Case On Emulator?

Jan 9, 2010

After following some instructions on Diego Torres blog I am able to test my classes using the regular Eclipse JUnit test-runner, however I also want to be able to run my unit tests from within the emulated android environment. For now this should make no real difference since the classes I am working on do very basic numerical or networking tasks, but obviously anything which involves the UI or Android API specific functions can only ever be tested on the emulator.

I set up a new run configuration of type AndroidJUnitTest wich uses the ndroid.test.InstrumentationTestRunner, however whenever I fire up the test I get the following error in the console:

[2010-01-09 00:45:23 - Pal1]Uploading Pal1.apk onto device 'emulator-5556'....................

View 1 Replies View Related

Android :: What Case Managed Query Method Return Null If Uri Is Provided?

Jun 25, 2010

I am doing some android application. I just wonder what will case the managedQuery method return a null value?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved