Hi guys,

GREETINGS OF THE DAY,

in your broadcast reciver u have to implement phone state listener's
onCallStateChanged method. this method gives state of phone i.e. ringing,
idle, offhook.

You can find details about it on android developer by firing serach on phone
state listener. hope this works for you.

--
Thanks & Regards,
Kapil Lokhande | Dexter Advisory Pvt. Ltd. <http://dexterltd.com/> | Android
Developer
[image: dexterlogo.jpg]


On Fri, Apr 1, 2011 at 11:06 AM, Sven <sirdarthna...@googlemail.com> wrote:

> Have a loot at there:
> http://developer.android.com/reference/android/telephony/TelephonyManager.html
>
> You have to register a BroadcastReciever in your Manifest (like your
> outgoing one) with the intent filter android.intent.action.PHONE_STATE
> and you need the Permission READ_PHONE_STATE.
> If you check for the state CALL_STATE_RINGING, then you know there is
> a incoming call. Then you can start your app. You can start your
> activity or service.
>
> I'm working on a app using this as well, but at the moment I'm at work
> and don't have the source in front of me, to give you detailed
> example. Maybe you can find out with the help i gave you here, if not
> i can post some example later the day when I'm at home.
>
>
>
> On Mar 31, 12:17 pm, C Sardar <crsardar....@gmail.com> wrote:
> > Hi,
> >
> > Whenever a new outgoing call in placed OS broadcast a native action
> > "ACTION_NEW_OUTGOING_CALL" and we can listen to an outgoing call as
> > follows
> >
> > public class OutgoingCallListenerCRS extends BroadcastReceiver{
> >
> >         @Override
> >         public void onReceive(Context context, Intent intent) {
> >
> >                 Log.e("Chitta : ", "Its working");
> >         }
> >
> > }
> >
> > //////////// manifest as follows
> >
> > <application android:icon="@drawable/icon" android:label="@string/
> > app_name">
> >
> >                 <receiver android:name="OutgoingCallListenerCRS"
> > android:enabled="true">
> >                         <intent-filter>
> >                                 <action
> android:name="android.intent.action.NEW_OUTGOING_CALL"/>
> >                                 <category
>  android:name="android.intent.category.DEFAULT" />
> >                         </intent-filter>
> >                 </receiver>
> >
> >     </application>
> >
> >         <uses-permission
> > android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
> >
> > Similarly I want to do same for an incoming call,
> > I want to make an app that will start by itself whenever a new
> > incoming call appears, by listening to OS's Native Android Broadcast
> > Actions, is it possible?
> >
> > If not, how can I make an app that will start by itself whenever a
> > incoming call comes in device even though my app was not started
> > before the incoming call.
> >
> > Please give some idea or sample etc........
> >
> > Thanks & Regards
> > CR Sardar
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<dexterlogo.jpg>>

Reply via email to