What's the best way to use Amazon Simple Storage Service (S3) on Android?
For iPhone I use ASIHTTPRequest. Is there something similar for Android?
There is now an Amazon-supported Android SDK: http://aws.amazon.com/sdkforandroid/ . It's only been out since the end of 2010, but it seems to work well - it allowed me to easily upload a photo to S3.
To be honest I think if no library exists which works with android you will need to just roll your own. Take a look at the REST API and implement just the methods that you need for your application.
Doing it this way is more work but you will keep the filesize of your application down.
I think any S3 Java API should do it ? Look at the docs for Java API Libraries.
Related
I need to know that whether we can use same database or URL for ios as well as android.
For example I am logged in with android so in the section where we use the URL , can we use the same URL for android which we use for ios. Actually I want to make an app for ios and android both.
But I want to make only one database for both that is android and ios.
I have tried using one URL in my login activity which was working on ios..but its not working.can somebody guide me?
Yes. It is very possible. It depends on the method youu are using to retrieve/send data to the database. The most popular ways to do the same is use of REST or SOAP to do client-server communication. Both work fine, but you will need to learn about doing the same. I would recomment REST for android since it is the most commonly used and is also easy to understand and use.For Ios i would recommend the AFNetworking library, speed is recommendable. You can download the library using this link:
https://github.com/AFNetworking/AFNetworking
I'm using a Google API (in this case, Classroom) for an Android app using com.google.api.services.classroom.Classroom. I want to cache the results on the device for speed/offline usage. Is there a quick-and-easy way to do this that uses the same java API? Can put something like an HttpResponseCache in the middle there somewhere?
Depends on your definition of "quick-and-easy", but I think the accurate answer here is no (!)--those methods are designed to be used "online."
I am making a simple apps for Android, This apps have some function:
- Upload
- Download
- ShowAllFile
When i use Gdata, it's easy to make this function in Java
But Gdata didn't support Android.
Can anyone give sample code for GoogleDoc in Android which use google-api-java-clien ?
Best Regards
P/s: UPDATE: i can upload file
You should have a look at http://samples.google-api-java-client.googlecode.com/hg/picasa-atom-android-sample/instructions.html?r=default. This is a sample for Picasa, but GDoc is much the same.
Of course G-Data is supported in Android
On there you will find samples and a video with a presentation on how to access G-Data API on Android
http://code.google.com/p/google-api-java-client/wiki/MediaUpload (from 1.7)
I had been working on android since a little long. Now I am wondering about titanium. Is it possible to write android (java) code in titanium app since the app is build in titanium? If yes then how? Actually I am having problem dealing with push notification for android in titanium. So I got a solution to build complete app in titanium and then if possible use android code in app to deal with push notification. How? Please do response as quickly as possible. Thanks in advance.
To answer your question directly, you will need to develop a native Android extension to call Java code via JavaScript in a Titanium application.
Rai
You should be checking out the docs Here tells you all you need to know
Hope it helps
Frank
yes it is possible but remember that the titanium tools lag behind the official android ones. Documentation is poor and often wrong, code is laggy and the resulting .apk are much bigger.
Why are you thinking of using Titanium? For cross-compatibility?
If you are thinking about that you have multiple possible ways:
1) Build a minimum common denominator, like titanium, but better: Write a core application for both android and iPhone so that it will be fast and light on memory, with a modified broswer to show your content. This way the interfaces will be much easier and you'll have to write the content just once.
Still you will be able to access low level hardware, like GPS, compass, gyroscope.... easily without consuming too much battery (unlike with titanium) as needed.
2) Find an existing minimum common denominator: Javascript work both on iPhone and Android.
3) There are many other options (Adobe air, python, custom scripting, mobile web site, ...) but I think that the cons outweigh greatly the pros.
I need read about 100 samples per second off the accelerometer on a Android, and at a fixed sample rate. The current sensormanager does or offers neither.
I've read Need to read android sensors really fast
He seems to have access to the driver code which made his life easier.
I am curious if anyone has been able to do something like this through the NDK w/o that type of knowledge.
Thanks in advance!
I have taken a look at sensor.h, and the API looks very promising; however, a little howto on how to deal with the ASensorEventQueue and ASensorEventQueue_hasEvents and so forth would be -extremely- useful.
Ha! Update:
This looks a code example for what you want to do.
http://developer.android.com/reference/android/app/NativeActivity.html
Since Android SDK version 9 (for Android > 2.2) it seems to be possible to use the sensors via NDK.
See the STABLE_APIS.html file included in the docs. (Search for "sensor.h"). A mirror of that file is here.
Example from google https://github.com/googlesamples/android-ndk/tree/master/sensor-graph.Their code allow you controll SENSOR_REFRESH_RATE_HZ for the accelerometer.Written on c++ and connected to java code through the NDK.
I have recently worked on a pure C sensor application for android. Using NDK, you can access the sensors on the device without using Java.
Check : https://github.com/PromiseMasango/sensor.
Check : https://github.com/PromiseMasango/Android-NDK-sensor-example.
Sensors can be read reading directly from system "files" like:
/sys/class/sensors/light_sensor/lux
or
/sys/class/sensors/light_sensor/raw_data
I wonder if there is a more direct way to do it, reading directly from the chip.
Like something in /dev/...