Upload
shephertz
View
1.111
Download
3
Embed Size (px)
Citation preview
How to Upload, Cache, Save and
Share Images in an Android App
3-Step Process to start using Images
in your App
Images play a very important role because they leave a long-lasting
impression on the mind of a User.
App42 provides the easiest way to start Uploading, Processing, Saving
and Sharing Images in your App.
Upload an Image on the server from Android SD Card using
App42 Upload Service
Download URL and Cache to make a swift App
Save Image on your SD card
Ninja
Fight
Image Uploading
Upload Image using App42
File Upload Service and get
a Web URL to access,
process, save and share the
Image.
UP
L
O
A
D
Download Images from the Webto your Android SD Card
Upload to App42 Cloud
Uploading files to the cloud is especially useful for Mobile Apps as this minimizes the
App footprint on the device
Image Caching
To ensure your App runs fast, caching is very important to allow easy retrieving. LRU Cache
Algorithm is one such mechanism
LR
U C
ache A
lgori
thm
LRU stands for Least Recently Used. New objects and
recently used objects are placed at the beginning of
the cache queue, thus leaving only the most-used
items there as LRU Cache have a fixed size.
Request
Response
Sampling and Saving
Image Sampling
While loading an image from the web, its resolution can be larger than the device.
Sampling can provide a better way of loading and optimizing memory.
Image Saving
After loading an image from the web, if you need to save it, you can do so on the
SD Card for further usage.
Image Sharing using App42
When you upload an image on the cloud, you get a URL respective to the image. Enabling
users to share it within their contacts increases User Engagement.
App42 provides various communication tools to share images within networks:
Push Notification In-App Message
http://www.Email Social Wall Post
Image-Processing with App42
Use App42 Image-Processing APIs to perform various operations on the uploaded images
Resizing
Creating Thumbnail
Scaling
Cropping
Converting Format and more
These APIs are very useful for mobile Apps where images need not to be stored locally
and processor intensive operations are to be performed.
Register with App42 Platform
Create an App once you are on the Quick-start page
If you are already registered, login to AppHQ console and create an App from App Manager ->
App Create link
Download the project from here and import it in eclipse
Open MainActivity.java file and pass the required information in onCreate method as shown
below (application keys for AppHQ console)
Change the application name with your application name in res/strings (useful to save image
in SD card)
Build and run the application
A few easy steps using our
Sample Application
1 App42API.initialize(this,"App42 API key","App42 secret Key");
To get Sample Application Program with complete source-code and process steps, see our Blog.
Visit www.shephertz.com for more.
Links for Reference :http://www.shephertz.com
http://api.shephertz.com
http://appwarp.shephertz.com
http://app42paas.shephertz.com
Follow us on:
Contact: [email protected]
Skype: ShepHertz