Thank you very much Dannie Hackborn My problem is solved now and app is working fine. Little question more: this process will work on 1.6,1.5 and 1.0 sdk's???
Best Regards, Gulfam Hassan On Jan 12, 11:11 pm, Dianne Hackborn <hack...@android.com> wrote: > To cancel a call, you set the resultData to null as described in the > documentation: > > http://developer.android.com/reference/android/content/Intent.html#AC... > > > > On Fri, Jan 8, 2010 at 5:04 AM, Gulfam <gulfa...@gmail.com> wrote: > > Hi All, > > > I am facing issue with 2.0 and 2.0.1 on aborting broadcast for out > > going calls. > > > In my main activity on callButton press I am initiating call like this > > /*********************Mian Activity Where Call > > Initiating**************/ > > public class MainActivity extends Activity implements OnClickListener{ > > > public void onClick(View v) > > { > > if(v == callButton){ > > > String phoneNumber = "+45123456" > > Intent DialIntent = new Intent > > (Intent.ACTION_CALL,Uri.parse(phoneNumber)); > > > DialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > > startActivity(DialIntent); > > } > > } > > } > > //*************************Here is my Broad Cast > > Receiver********************// > > Public Class MyOutGoingCallReceiverIntent extends BroadcastReceiver{ > > > public void onReceive(Context context, Intent intent) { > > > String dialNumber= intent.getStringExtra > > (Intent.EXTRA_PHONE_NUMBER); > > > if(dialNumber.startsWith("+45"))//***International number > > abort broad cast*****// > > { > > Log.i("Before Abort Broadcast","11111111111"); > > abortBroadcast(); > > Log.i("After Abort Broadcast","22222222222"); > > > Intent DialIntent = new Intent > > (Intent.ACTION_CALL,Uri.parse(3224005421));/**local number > > DialIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > > context.startActivity(DialIntent); > > } > > > } > > } > > > /**************Register Receiver In menifest********************/ > > <receiver > > android:name="MyOutGoingCallReceiverIntent" > > android:enabled="true"> > > <intent-filter > > android:priority="200"> > > <action > > > android:name="android.intent.action.NEW_OUTGOING_CALL" /> > > <category > > > android:name="android.intent.category.DEFAULT" /> > > </intent-filter> > > </receiver> > > > /**********************Permissions in menifest******************/ > > I have added these permissions in menifest > > > <uses-permission android:name="android.permission.CALL_PHONE"></uses- > > permission> > > <uses-permission > > android:name="android.permission.PROCESS_OUTGOING_CALLS"></uses- > > permission> > > <uses-permission android:name="android.permission.CALL_PRIVILEGED"></ > > uses-permission> > > > ********************************************** > > Now move towoards Issue abortBroadcast(); is working fine with 1.0 to > > 1.6 SDK's but when i run the same code on 2.0+ SDK's Its print the Log > > statments as > > > Before Abort Broadcast 11111111111 > > After Abort Broadcast 22222222222 > > > But not Abort the broad cast. Any one can help me regarding this > > issue. > > I have read the Documentation of 1.0 and 2.0 but there is no > > difference in documentation. > > My application is also running on market and there is no issue with > > 1.0 to1.6 but now i am porting it for 2.0 its not aborting broadcast. > > Is there any solution ???????????? > > > Thanks in advance. > > > Gulfam Hassan > > > -- > > 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<android-developers%2bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.
-- 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