Archive for 'Broadcast'

Direct Carrier Billing is a key payment option because it lets users purchase and pay for apps more easily. It’s also important because it offers a convenient way to buy in regions where credit cards are less common.

Android Market In-app Billing is an Android Market service that lets you sell digital content in your applications. You can use the service to sell a wide range of content, including downloadable content such as media files or photos, and virtual content such as game levels or potions or special-weapons or bonus items.

Refer Here:
http://developer.android.com/guide/market/billing/billing_overview.html

To implement in-app billing in your application, the following steps need to be done
Download the in-app billing sample application.
Add the IMarketBillingService.aidl file to your project.
Update your AndroidManifest.xml file.
Create a Service and bind it to the MarketBillingService so your application can send billing requests and receive billing responses from the Android Market application.
Create a BroadcastReceiver to handle broadcast intents from the Android Market application.
Create a security processing component to verify the integrity of the transaction messages that are sent by Android Market .
Modify your application code to support in-app billing.

For a more detailed step visit the following link
http://developer.android.com/guide/market/billing/billing_integrate.html

Executing application at Bootime on Android

In Android OS, we can start an application at boot time. BroadcastReaceivers are used for implementing this. They can listen for defined system or custom defined intents. They are executed when the intent is fired, even when the application is not running at the moment. You can define custom actions and fire them manually to control custom receivers, but there are several predefined broadcast within the operating system that are fired automatically on certain events.One among them is android.intent.action.BOOT_COMPLETED action. To receive this action one has to extend the Broadcastreceiver class accordingly.

A sample code snippet is Shown Below:

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.schogini.bootAPP"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".LaunchActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<receiver android:name="MyIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</manifest>

Java Coding:

package com.schogini.bootAPP;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class MyIntentReceiver extends BroadcastReceiver {
//This is called when boot completes
@Override
public void onReceive(Context context, Intent intent) {
//Set what activity should launch after boot completes
Intent startupBootIntent = new Intent(context, LaunchActivity.class);//new class to be launched
startupBootIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(startupBootIntent);
}
}

Usage Scenario:
An anti-virus/anti-malware app
A security app
Mobile Anti-theft App
Mail Client…etc

We Can Build Your App for You. Lets Get Started !