Have library zkSforce for android? - android

i have used zkSforce library for IOS but now i want use for android because c panel created in saleforce so i don't have library and any solution for this. Please provide me any hint or solution.
Thanks for advance

You have 2 main options
1) Mobile SDK for Android, see https://github.com/forcedotcom/SalesforceMobileSDK-Android this provides a wrapper for the Salesforce REST API and includes pre-canned implementations of the OAuth login flows etc.
2) WSC see https://github.com/forcedotcom/wsc is primarily a java soap stack and wraps the Salesforce SOAP APIs (this is the same API that ZKSforce wraps). This should be usable on Android, but provides nothing Android specific.
I'd recommend (1) unless you have specific requirements to call the SOAP API.

Related

How to integrate a simple API in an Android application

I need to integrate a simple Web API in my Android application, and I was looking for a way to do that.
I was told I should use a service, but other peoples told be about Robospice, AsyncTasks, and Java Threads.
What should I use ? Is there some ressources out there ?
This goes through integrating a Web API into an Android app step by step, using AsyncTask.
http://blog.strikeiron.com/bid/73189/Integrate-a-REST-API-into-Android-Application-in-less-than-15-minutes
For more improved and fast response use Android Asynchronous Http Client with Gson library : You will find a complete tutorial here

Xamarin comonality layer for Android/iOS/WinPhone

Xamarin / Mono-touch lets you leverage any native code / APIs on the target platform. . But is there a commonality layer, so that things like accelerometer, camera and so forth can be written using the same code?
There are multiple libraires designed to be used across different platforms (available through the component store):
Xamarin.Mobile to access device capabilities
Xamarin.Auth to authenticate users on OAuth
Xamarin.Social to access social networks
and then all the projects targeting PCL and available via nugget:
Json.NET
HttpClient
That should get you started. Oh, one more thing. If you use HttpClient, have a look at ModernHttpClient (component store)
The Xamarin.mobile API provides this abstraction layer to access features that are typically provided on all supported platforms.
I have added some device abstraction in my libraries. Currently Battery (level and charger status) and Accelerometer are abstracted to static classes that are 100% identical interface between iOS, Android & WP8. As time permits I will add more, including GPS.
https://github.com/sami1971/SimplyMobile
To use serializer in PCL libraries I have created a common interface so you can use non-PCL's as well. Some of the best performing (de)serializers are not available as PCL and some aren't available on iOS at all but a common interface allows one to pick the best per platform. Some performance test results are posted on Xamarin forums: http://forums.xamarin.com/discussion/9886/quick-json-serializer-performance-test-json-net-vs-servicestack/p1

Can the Eventful java client library be used for Android?

I am creating an app showing local events for android. I was hoping to use the Eventful API, since that came with its own java-based client library. However, I'm not sure if it's fit for Android, since I know a lot of these java based client libraries use stuff Android doesn't support.
So, does anybody know if it works?
My entire project is available # github if you want to check it out for yourself.
The API is found here.
Android does not have have issues with Java client libraries. It is build on top of standard Java, and can use all of the framework features.
Furthermore, it looks like this API offers a RESTful interface, which is for sure supported by Android.
Bottom line, I do think you can use this API in Android without issue.
I'd say the easiest way is to compile and run an application that embeds the library and tests a few methods.
Typically, you may have issues with the way the networking is handled. There are 2 main ways in android to do HTTP, the Java and the Apache way, I think the Java URL API is fully supported and very close to the actual Java version, but the Apache has some hidden differences.
The main risks you'll have are A/ that it uses classes or packages that are not present on Android. B/ that a class does not behave as expected, which does happen from time to time, as the Android implementation is entirely specific.
Apparently you have already tried to run an android app with the library included? Did you encounter a specific error? If you, can you post the stacktrace?

Sharing code between GAEJ and Android projects

In Eclipse:
Is it possible to Sharing code between GAEJ and Android projects? And or GAEJ and another GAEJ?
Thanks
there was a nice talk about GAE & Android integration on the last GoogleIO 2012:
Google I_O 2012 - Building Mobile App Engine Backends for Android, iOS and the Web
they show how to use same data structures for data exchange between Android and GAE.
If you asking about how to set it up in Eclipse, I use the 'linked source' option in the source tab of Java Build Path. Here's a blog post with details:
http://blog.christoffer.me/2011/01/sharing-code-between-multiple-java.html
If you are asking about whether it is practical - from the code perspective - that is trickier.
When trying to share Android code with GAE/J I discovered that I had dependencies on android packages, e.g. android.util.Base64. Sharing code means dropping stuff like this and using 3rd party libraries instead. For example, the Guava library works on GAE/J and Android:
http://code.google.com/p/guava-libraries/
Logging is another problem. My GAE/J code was writing to java.util.logging.Logger, whereas my Android code ultimately logs to 'android.util.Log.println. If you use a common library framework like log4j or just writing to System.Out I think you will lose functionality in the log viewer - ideally you would have a logging library or shim that mapped to java.util.logging.Logger or android.util.Log.println depending on the platform.

Architecture for webservices and android

I'm going to develope an application based on web services (axis2) and android (clients).
I'm now planning the logic architecture for my system and I supose that it should be like a SOA architecture. I have seen that a SOA architecture is based on layers.
So, this would be a "correct" logic architecture for my application? (with some changes of course)
http://geeks.ms/cfs-filesystemfile.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/unai/DDD_5F00_NLAYER_5F00_ARCHITECTURE_5F00_SMALL_5F00_6ADA95E1.png
Android code (activities) would be on Presentation Layer?
EDIT
April 2014
Now, 3 years later with some more experience... REST is the best :)
Warning, it may that this answer is not at all an answer to you question but anyway, here is my thoughts.
I'm definitely not a SOA specialist but since SOA can be implemented with REST, it should not have any consequences on a SOA architecture. Android is REST-ready (see that Google IO 2010 session on REST) and there is only little SOAP support on android (afaik, but I may be wrong).
At some point, you'll have to evaluate the feasibility of the interop. between your Axis WS-* with any existing android SOAP support (the well-known ksoap2 project for example). The result could be not without impact on your architecture design.
The point here is: if you do use Rampart to use WS-Security, for example, on top of Axis2, it seems to me there are little chances that ksoap may interact at all (technically) with your service provider. On the one hand, if the service is simple and can be bound with ksoap2, great, go on. On the other hand, if you would use a not so simple security or authentication scheme, it could just be a nightmare to get the things done with the simple SOAP support on android. In the latest case and as the REST approach seems to be the preferred philosophy on android, you may be confronted to the decision to have a REST proxy dedicated to android between your Axis2 business WS and the android client-side application.
In the hope it may be of any help.
Perhaps you could even try SOAP. Android supports SOAP web services and provides ksoap2 libraries which you can use for sending request and getting response from your server easily.
For starters just check this out. Now, the latest version of ksoap also supports passing of Object Arrays.
For more information of ksoap2, I suggest to read this
Cheers
All the best

Categories

Resources