Running the Android example SampleSyncAdapter - android

I installed the example SampleSyncAdapter from the sdk into eclipse--it runs in the emulator--e.g, if i go to Settings>>Account & Sync, I do see the SamplesyncAdapter Account--but i can't log in when i select it--the Google documentation is next to useless in terms of orienting developers--what should I enter to log in? How do I run the application--I want to run it in debug to walk thru the code.
UPDATE: i found answer--if anyone is having same issue:
http://groups.google.com/group/android-developers/browse_thread/thread/ac875a97679122f0
Refer to the reply by Megha in the above thread--also, refer to the class NetworkUtilities if you are trying to understand how the external server is contacted for the update--in my case I will alter this class to point to a local tomcat/servlet to experiment.
It sure is hard to understand why the Google Developer Reference site does not contain the information in the above thread--which was supplied by a google employee over a year ago.

yes, that link is interesting, there you will find information about the serverside, but here you have other interesting links bout it:
this is the documentation in developer.android.com :
http://developer.android.com/training/id-auth/custom_auth.html
here's an article where you will also find information about the
components of the Android application:
http://www.techrepublic.com/blog/app-builder/breaking-down-googles-samplesyncadapter/1037
and here's other interesting article here on StackOverflow :
How do I use the Android SyncAdapter?

Related

Download File From DropBox - Android

I am trying to write an app in Android that when requested will download a specific file from DropBox if the file is available.
I have gone through all of the tutorials in the developer section on the DropBox site but I don't think they are really detailed enough as each of the tutorials seem to have bits missing and I haven't been able to get any of them to fully work.
I have tried examples of both uploading/downloading files from the tutorials but each time I get to this part of my code I get Exception errors. This leads me to believe that I have missed something out so I was wondering whether there was a decent tutorial anywhere that properly explains the process of downloading a specific file (rather than bringing up DropBox for the user to select the file) from dropBox so that I can follow it through and hopefully will help me to understand where I am currently going wrong.
I know there are lots of questions similar to this but most of them state that they can get part of the process to work and need help on a particular part but I don't seem to be able to get anything to work other than the actual linking to my DropBox account (I have created a DropBox app and have added the keys etc. to my software).
If anyone can help point me in the direction of a decent tutorial that properly explains this process I would be grateful.
Thanks...
I thought I should expand on my issue which hopefully will help to identify the problem that I am having.
The main tutorial I am using at the moment is: https://www.dropbox.com/developers/core/start/android
I have created an app in the App Console which allows file sharing; this has also given my key and secret code.
I have downloaded and installed the mentioned SDK and have added it to my project; I know this works as without the SDK installed most of the code produces errors.
I have added the beginning part of this tutorial which sets up the authorization to DropBox from my app; this works as when I test it I am taken to a page on my device that requests that I select the correct DropBox account. Up to this part I have no issues with and it all seems to work.
The next part of the tutorial mentions uploading/downloading files and reading the directory structure. I have tested all of these separately but for each one I get an Exception error; the errors seem to mention something called "json" and a class not being found. The tutorial does not mention needing to install another SDK or any other library files so I am unsure whether it is assuming that something has already been done which I have not known about so hasn't been done.
I hope this makes sense and would appreciate any help you can give me...
It looks like the error is related with JSON library you used to connect with Dropbox server. here is the libraries list I used for my application, it works well and can download the file to cache.
dropbox-android-sdk-1.6.1.jar
dropbox-core-sdk-1.7.7.jar
jackson-annotations-2.2.3.jar
jackson-core-2.2.4.jar
jackson-databind-2.2.4.jar
The library jars in the dropbox-java-sdk-1.7.7 package are not enough.

Configuring Android Steroids App to work with Facebook-Phonegap plugin

I would be extremely grateful if someone could walk me through the process of configuring my facebook app to accept connections from my android scanner build of my steroids app. Specific areas that I am not entirely clear on are:
Generating a keystore for my app
Hashing the keystore
Configuring the Android build settings
Configuring the facebook settings within Facebook. With specific attention to what Class Name / activity I want facebook to launch, and how to ensure my Class Name and package name are consistent with my Android build settings.
I've been fighting with this for a while, and can't help but feel as though I am missing something simple.
I'm not sure if you have gone through the official documentation or not; but they have explained each steps that you've mentioned step by step: https://developers.facebook.com/docs/android/getting-started/
Try for once (if not tried yet), and if you find any specific problems post your questions here (I don't think you'll find any after reading the doc)
I had the exact same issue.
I have used Android Decompiler to find the main class.
In my case it was: com.appgyver.runtime.standalone.chromium.MainActivity.
Looks pretty generic. Might work in your case too.

Android: Get Google Docs files pogramatically

I'm creating an android project that will allow the user to get Google Docs and I don't know where to start. Could someone help me with the basics?
Start here: http://code.google.com/p/google-api-java-client/

Google IO Twitter Livefeed from a fresh install

I just dowloaded the Google IO Source code from here: http://code.google.com/p/iosched/ in order to understand the great UI of this app.
I also wanted to grab the code of the Twitter LiveFeed, but when compiling freshly downloaded code, I get a crazy UI:
I don't understand what's wrong as I didn't changed one line of the code!
Does this issue happens on other people devices?
Thank a lot.
I answer myself in case other people also searching for the answer:
http://twitter.com/#!/romannurik/statuses/69818965840506880
yes we used some custom Google
Realtime Search tweaks that I
explicitly removed from open source.
So that seem impossible for now... Or we will have to look for other alternatives

android sysout and log

Whether i should should use sysout or Log.x en-order to debug an android project. I think both are writing to file. Me, commonly using sysout and use filter in LogCat to get it easily. But most of the tutorials and sample i see it is mainly using log.x
What is its basic difference? any link or tutorial for that? Which is better to use?
Thanks
Hai Labeeb Brother, You can refer this from andbook which may download from the following site using your facebook account itself
http://www.docstoc.com/docs/57705463/Android
if downloaded that book, pls go through the page number 45 and 46. this will give clear idea brother.
refer those pages of the book ,in the following image brother
In general, it's a good practice to avoid using sysout (even when using standard java development).
Using the Log object gives you support for tags and priorities.
Logcat has built-in filtering capabilities on tags and priorities.
There's also a performance gain when using the Log object properly, as writing a lot of info to the output stream can be an expensive operation.
The Log object also exposes an isLoggable that allows for selective logging (depending on tag and priority).
Information on viewing the log output can be found here : http://developer.android.com/guide/developing/tools/adb.html
Information on the Log object can be in the Android Developer Reference under android.util.Log
Some options for viewing your log output on your android phone can be fuond with the following Google query : android logcat viewer phone

Categories

Resources