Wednesday, 25 July 2012

Upload apk into Android Market

Steps for Create a certificate for Android Market apk:

1.If you are using Eclipse for Development just right click on your project and click export.
2.Now choose Android and then Export Android Application. In the next step confirm the project that you want to export.
3.Then click next and now you should be able to select create new keystore.
4.Now fill in the required fields and your should be able to sign your app.
5. Be sure to make a backup of the keystore file and remember your password. Losing this will make it impossible to update your application.
6.If you are using the terminal to create a keystore and you have Java SDK installed there should be a program called keytool in /usr/bin (on a unix based system).
7.On Windows the SDK should also come with the keytool but the install location may be different search for keytool.exe on your computer if keytool is not in your path already. With this tool you should be able to create a key in the following way:
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -validity 10000
8.Remember that once you lose your Certificate or it expires you will not be able to sign your application. Make sure that the expiration date is a long long time in the future. 
Reference sites: Link1
Publishing Updates on Android Market :

1.At any time after publishing an application on Android Market, you can upload and publish an update to the same application package.
2.When you publish an update to an application, users who have already installed the application may receive a notification that an update is available for the application. They can then choose to update the application to the latest version.
3.Before uploading the updated application, be sure that you have incremented the android:versionCode and android:versionName attributes in the element of the manifest file. Also, the package name must be the same as the existing version and the .apk file must be signed with the same private key.
Here we need to change:
Go to manifestfile and set the version code like this:
 <manifest xmlns:android=""
 android:versionName="2.0" >
 Here , old versioncode: 1  and new version code:2
4.If the package name and signing certificate do not match those of the existing version, Market will consider it a new application, publish it as such, and will not offer it to existing users as an update.
5.You have to have the same keystore file which you have used to upload the 1st version of application on android market. If you have lost this keystore file then you can't provide update to this application.
Note: Dont forgot to keep a backup of your keystore file.

Refered Links: Click Here

Thursday, 19 July 2012

Android Pdf Reader

This example shows you how to open a pdf file from your activity.
1.) Create a new project by File-> New -> Android Project name it PDFReader.
2.) You will see some default code into your main.xml and android manifest file.
3.) Download and install any adobe reader application from android market.
4.) Write following into main.xml file:

android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="PDFReader" />

5.) Copy any pdf file onto your sdcard.
6.) Make sure to change the name and path of your pdf file in PDFReaderActivity class. In this example I have used “/sdcard/sample.pdf” . You can change the name of your pdf instead of sample.pdf.
7.) Run for output.

Screen Shots: 

Here is Source Code: Download From Here

Wednesday, 18 July 2012

FacebookIntegration into android application

Steps for Facebook Integration in Android:
The Aim of this article is, to get Facebook integration into our Android Application.

1.Apply for a Facebook Application ID (APP_ID):
For this, we need a facebook account to create our own application.This link will help to create a new application in our account.Click Here
In this site, top corner of the right side, we have an option to create an application i.e
Create New App. Just click on that.. It moves to new window, and need to provide application name and namespace.
Next, it moves to the Our application information page. It contains the App ID , App secret ID and some basic Information.
Here is the screen shot: 
2. Include the Facebook APP_ID in your Android Application:
We need to include the APP_ID into our android application.
So far so good, everything is setup on the Facebook front, now it’s time to start coding our Android application.
On the Android front, we’ll use the Facebook Android SDK located at Github: DownLoad Here

The Facebook Android SDK is licensed under the Apache License and is completely 
open source.
The project contains several samples in the examples folder, but the core SDK is located in the facebook folder.

Here is the full source Code:SourceCode

3. Import the sdk into our application:
This sdk , we will import into our sample application for facebook intraction purpose.

This sdk contains 5 java classes, those are manage to intraction of facebook.

4. Our Sample Applicatoin:
Main page:
This page contains the login button. By using this, first we login to our facebook account.
Then after, in our application contains the few implementations to intraction with facebook. Those are:
                                   1. Update Status.
        1. App Requests
        2. Uploaded photos
        3. Get Friends
        4. Current Location
Few Screen Shots in our Application:
After Updating status in FB

Update Status

Login Screen
Main Page

Here is the Reference Link: Click Here

Tuesday, 3 July 2012

RSS Reader in Andorid

RSS stands for Really Simple Sydication. It allows you to easily stay informed by retrieving the latest content from the websites you are interested in. These Feeds automatically syndicate the articles in a website and convert them into a standard XML format which can be viewed using software called RSS Feed Reader or Aggregator

 Here, it has few steps:


Monday, 2 July 2012

Custom Wheel Widget.

Android provides a DatePicker widget, but not an iPhone-like. The android-wheel project helps in building similar components, with a range of controls.
To build a widget using android-wheel, the project should be checked out from SVN and be referenced as an android library. The google project contains 'wheel' and 'wheel-demo' modules.
Quick Notes On The Widget
Package : kankan.wheel.widget is the base package.
View : WheelView is the View class that creates the wheel.
Listeners : OnWheelChangedListener, OnWheelScrollListener, OnWheelClickedListener support wheel actions like onChanged, onScrollingStarted, onScrollingFinished & onItemClicked.
Adapter(s) :
  • WheelViewAdapter is the adapter interface for the wheel items.
  • NumericWheelAdapter is a concrete implementation to support numeric values.
  • ArrayWheelAdapter<T> is a concrete implementation to support <T>
  • Custom implementations of WheelViewAdapter can be written using AbstractWheelTextAdapter. 

    Screen Shot:  


ActionBar with Tabs:

The Action Bar is a widget for activities that replaces the traditional title bar at the top of the screen. By default, the Action Bar includes the application logo on the left side, followed by the activity title, and any available items from the Options Menu on the right side.

Here is the Source Code:

Screen Shot: