skip to main |
skip to sidebar
RSS Feeds
Nope. nothing .. just some random thoughts come to my mind ...
Nope. nothing .. just some random thoughts come to my mind ...
6:45 AM | Sunday, May 6, 2012
Posted by harshadura
10:02 AM | Monday, December 5, 2011
Posted by harshadura
If you are using Eclipse for Development just right click on your
project and click export. Now choose Android and then Export Android
Application. In the next step confirm the project that you want to
export. Then click next and now you should be able to select create new
keystore. Now fill in the required fields and your should be able to
sign your app. Be sure to make a backup of the keystore file and
remember your password. Losing this will make it impossible to update
your application.
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). 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
12:58 PM | Thursday, November 17, 2011
Posted by harshadura
Ref : http://android.jmsliu.com/209/add-google-admob-in-android-application.html
______________________
Admob is a new way to monetize mobile applications. Currently,
it supports multi-platform, including iPhone, Android, WebOS, and Flash
Lite. Here I will show you how to integrate Admob in your android
applications.
First, we need to go to the Admob website to register an account, in order to get the Admod account ID.
Second, let’s go the google code to download the latest Google AdMob Ads SDK
for android. You also can get download it from your admob “Sites &
Apps” setting page. After we get the AdMob SDK, we need to add the jar
in our android application Build Path. Then, you just need to put some
simple codes to show your ads in your applications.
1. For Admob, it’s better to add the com.google.ads.AdActivity in your Manifest.xml file. And don’t forget to add the user permission for it. Below is my mainfest.xml example.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| <?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jms.AdmobExample" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8"/> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".AdmobExample" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/> </application> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/></manifest> |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| <?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" ><ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/a" /><com.google.ads.AdView xmlns:ads="http://schemas.android.com/apk/res/com.jms.AdmobExample" android:id="@+id/adView" android:layout_width="fill_parent" android:layout_height="fill_parent" ads:adSize="BANNER" ads:adUnitId="a14dbba084368db"/></LinearLayout> |
1
2
3
4
5
6
7
8
9
10
11
12
| <?xml version="1.0" encoding="utf-8"?><resources> <declare-styleable name="com.google.ads.AdView"> <attr name="adSize"> <enum name="BANNER" value="1"/> <enum name="IAB_MRECT" value="2"/> <enum name="IAB_BANNER" value="3"/> <enum name="IAB_LEADERBOARD" value="4"/> </attr> <attr name="adUnitId" format="string"/> </declare-styleable></resources> |
1
2
3
4
5
| AdView adview = (AdView)findViewById(R.id.adView);AdRequest re = new AdRequest();re.setTesting(true);re.setGender(AdRequest.Gender.FEMALE);adview.loadAd(re); |