[android-developers] Re: How to block incoming call in Android?

2010-04-02 Thread Bob Kerns
As to your first approach, the error message means simply that you're
trying to call it in some other thread than the main thread.

While you COULD set up a Looper for the thread you're using, it's
probably NOT what you want to do.

As for the second -- I don't have any info for you, sorry.

On Apr 2, 3:27 pm, jitendra kumar  wrote:
> Dear Bob,
>
> *What does it mean to block an incoming call?*
> This means I want to block incoming call for unknown number. Phone/Dialr app
> should not launch in case of unknown number. In that case mute the ringer is
> not a solution at all.
>
> According to my finding , there are two way of blocking incoming call:
>
> 1) using Phone Object
> 2) using AT command to modem
>
> --- for first approach i am not able to get Phone object. We need to find
> out how can we get Phone object using below function call:
>
> mPhone = PhoneFactory.getDefaultPhone();
>
> I am able to build the project including above function call but while
> executing the application i am getting below exception:
>
> 04-02 09:00:14.852: ERROR/AndroidRuntime(231): java.lang.RuntimeException:
> Unable to start activity
> ComponentInfo{com.android.CMdroid/com.android.CMdroid.CMdroid}:
> java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from
> Looper thread.
>  Why Exception???
>
> public static void makeDefaultPhone(Context context)
>
> Looks like when native phone application create default phone using above
> API, at same time PhoneFactory class store thread ID of Phone applicaton .
>
>    public static void makeDefaultPhone(Context context) {
>         synchronized(Phone.class) {
>             if (!sMadeDefaults) {
>                * sLooper = Looper.myLooper();*
>                 sContext = context;
>
>                 if (sLooper == null) {
>                     throw new RuntimeException(
>                         "PhoneFactory.makeDefaultPhone must be called from
> Looper thread");
>                 }
> When other application call getDefaultPhone() to get Phone object, in that
> case getDefaultPhone checks for phone thread ID which is store in variable
> called * sLooper*.
>
> public static Phone getDefaultPhone() {
>         if (sLooper != Looper.myLooper()) {
>             throw new RuntimeException(
>                 "PhoneFactory.getDefaultPhone must be called from Looper
> thread");
>         }
>
> This is the reason why we are getting exception when we call:
>
>  mPhone = PhoneFactory.getDefaultPhone();
>
> --- For 2nd approach we need to know how to send call disconnect command to
> modem using AT command.
>
> *The ATResponseParser class parses part of the AT command syntax used*
> *to**communicate with the mobile radio hardware in a mobile handset.
> This
> ** is, in fact, a* * command syntax very much like the AT command syntax
> used by modems, a ** standard* * described in the 3GPP document number TS
> 27.007 and related** specifications.*
>
> We need to find out how / what command pass to modem to disconnect the call.
>
> Regards,
> Jitendra Kumar
>
>
>
> On Mon, Mar 22, 2010 at 8:44 PM, Bob Kerns  wrote:
> > What does it mean to block an incoming call?
>
> > My guess is it just not ring.
>
> > In that case, it may simply mute the ringer, and register a
> > PhoneStateListener with the TelephonyManager. If it likes the number
> > in onCallStatechanged, it turns on the ringer.
>
> > I haven't tried it, and I haven't tried the app, either. I just read
> > the documentation.
>
> > On Mar 22, 4:17 am, jitendra kumar  wrote:
> > > Thanks Bibek for the information.
>
> > > *If we can't block incoming call using android SDK,  in that case how
> > > GBlocker application works???*
>
> > > *GBlocker Application Link:*
> >http://bubiloop.com/android-communication-gblocker
>
> > > Regards,
> > > Jitendra Kumar
>
> > > On Wed, Mar 10, 2010 at 11:54 PM, Kumar Bibek 
> > wrote:
> > > > Not possible.
>
> > > > Thanks and Regards,
> > > > Kumar Bibek
>
> > > > On Mar 10, 2:40 pm, jitendra kumar  wrote:
> > > > > Hi All,
>
> > > > > I want to develop one call control application on android. As we know
> > > > > android sdk does not provide any API which block incoming call due to
> > > > > security reasion.
>
> > > > > Is there any possiablity to block incoming call using android open
> > source
> > > > api;s?
>
> > > > > Please help me.
>
> > > > > Thanks,
> > > > > Jitendra Kumar
>
> > > > --
> > > > 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 > > >  cr...@googlegroups.com> > cr...@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.
> > T

Re: [android-developers] Re: How to block incoming call in Android?

2010-04-02 Thread jitendra kumar
Dear Bob,

*What does it mean to block an incoming call?*
This means I want to block incoming call for unknown number. Phone/Dialr app
should not launch in case of unknown number. In that case mute the ringer is
not a solution at all.

According to my finding , there are two way of blocking incoming call:

1) using Phone Object
2) using AT command to modem

--- for first approach i am not able to get Phone object. We need to find
out how can we get Phone object using below function call:

mPhone = PhoneFactory.getDefaultPhone();

I am able to build the project including above function call but while
executing the application i am getting below exception:

04-02 09:00:14.852: ERROR/AndroidRuntime(231): java.lang.RuntimeException:
Unable to start activity
ComponentInfo{com.android.CMdroid/com.android.CMdroid.CMdroid}:
java.lang.RuntimeException: PhoneFactory.getDefaultPhone must be called from
Looper thread.
 Why Exception???

public static void makeDefaultPhone(Context context)

Looks like when native phone application create default phone using above
API, at same time PhoneFactory class store thread ID of Phone applicaton .


   public static void makeDefaultPhone(Context context) {
synchronized(Phone.class) {
if (!sMadeDefaults) {
   * sLooper = Looper.myLooper();*
sContext = context;

if (sLooper == null) {
throw new RuntimeException(
"PhoneFactory.makeDefaultPhone must be called from
Looper thread");
}
When other application call getDefaultPhone() to get Phone object, in that
case getDefaultPhone checks for phone thread ID which is store in variable
called * sLooper*.

public static Phone getDefaultPhone() {
if (sLooper != Looper.myLooper()) {
throw new RuntimeException(
"PhoneFactory.getDefaultPhone must be called from Looper
thread");
}

This is the reason why we are getting exception when we call:

 mPhone = PhoneFactory.getDefaultPhone();


--- For 2nd approach we need to know how to send call disconnect command to
modem using AT command.

*The ATResponseParser class parses part of the AT command syntax used*
*to**communicate with the mobile radio hardware in a mobile handset.
This
** is, in fact, a* * command syntax very much like the AT command syntax
used by modems, a ** standard* * described in the 3GPP document number TS
27.007 and related** specifications.*

We need to find out how / what command pass to modem to disconnect the call.

Regards,
Jitendra Kumar


On Mon, Mar 22, 2010 at 8:44 PM, Bob Kerns  wrote:

> What does it mean to block an incoming call?
>
> My guess is it just not ring.
>
> In that case, it may simply mute the ringer, and register a
> PhoneStateListener with the TelephonyManager. If it likes the number
> in onCallStatechanged, it turns on the ringer.
>
> I haven't tried it, and I haven't tried the app, either. I just read
> the documentation.
>
> On Mar 22, 4:17 am, jitendra kumar  wrote:
> > Thanks Bibek for the information.
> >
> > *If we can't block incoming call using android SDK,  in that case how
> > GBlocker application works???*
> >
> > *GBlocker Application Link:*
> http://bubiloop.com/android-communication-gblocker
> >
> > Regards,
> > Jitendra Kumar
> >
> >
> >
> > On Wed, Mar 10, 2010 at 11:54 PM, Kumar Bibek 
> wrote:
> > > Not possible.
> >
> > > Thanks and Regards,
> > > Kumar Bibek
> >
> > > On Mar 10, 2:40 pm, jitendra kumar  wrote:
> > > > Hi All,
> >
> > > > I want to develop one call control application on android. As we know
> > > > android sdk does not provide any API which block incoming call due to
> > > > security reasion.
> >
> > > > Is there any possiablity to block incoming call using android open
> source
> > > api;s?
> >
> > > > Please help me.
> >
> > > > Thanks,
> > > > Jitendra Kumar
> >
> > > --
> > > 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 cr...@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
>
> To unsubscribe from this group, send email to android-developers+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post t

[android-developers] Re: How to block incoming call in Android?

2010-03-22 Thread Bob Kerns
What does it mean to block an incoming call?

My guess is it just not ring.

In that case, it may simply mute the ringer, and register a
PhoneStateListener with the TelephonyManager. If it likes the number
in onCallStatechanged, it turns on the ringer.

I haven't tried it, and I haven't tried the app, either. I just read
the documentation.

On Mar 22, 4:17 am, jitendra kumar  wrote:
> Thanks Bibek for the information.
>
> *If we can't block incoming call using android SDK,  in that case how
> GBlocker application works???*
>
> *GBlocker Application Link:*http://bubiloop.com/android-communication-gblocker
>
> Regards,
> Jitendra Kumar
>
>
>
> On Wed, Mar 10, 2010 at 11:54 PM, Kumar Bibek  wrote:
> > Not possible.
>
> > Thanks and Regards,
> > Kumar Bibek
>
> > On Mar 10, 2:40 pm, jitendra kumar  wrote:
> > > Hi All,
>
> > > I want to develop one call control application on android. As we know
> > > android sdk does not provide any API which block incoming call due to
> > > security reasion.
>
> > > Is there any possiablity to block incoming call using android open source
> > api;s?
>
> > > Please help me.
>
> > > Thanks,
> > > Jitendra Kumar
>
> > --
> > 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 > cr...@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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


Re: [android-developers] Re: How to block incoming call in Android?

2010-03-22 Thread jitendra kumar
Thanks Bibek for the information.

*If we can't block incoming call using android SDK,  in that case how
GBlocker application works???*

*GBlocker Application Link:*
http://bubiloop.com/android-communication-gblocker

Regards,
Jitendra Kumar


On Wed, Mar 10, 2010 at 11:54 PM, Kumar Bibek  wrote:

> Not possible.
>
> Thanks and Regards,
> Kumar Bibek
>
> On Mar 10, 2:40 pm, jitendra kumar  wrote:
> > Hi All,
> >
> > I want to develop one call control application on android. As we know
> > android sdk does not provide any API which block incoming call due to
> > security reasion.
> >
> > Is there any possiablity to block incoming call using android open source
> api;s?
> >
> > Please help me.
> >
> > Thanks,
> > Jitendra Kumar
>
> --
> 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.


[android-developers] Re: How to block incoming call in Android?

2010-03-10 Thread Kumar Bibek
Not possible.

Thanks and Regards,
Kumar Bibek

On Mar 10, 2:40 pm, jitendra kumar  wrote:
> Hi All,
>
> I want to develop one call control application on android. As we know
> android sdk does not provide any API which block incoming call due to
> security reasion.
>
> Is there any possiablity to block incoming call using android open source 
> api;s?
>
> Please help me.
>
> Thanks,
> Jitendra Kumar

-- 
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


[android-developers] Re: How to block incoming call?

2009-09-07 Thread Roman ( T-Mobile USA)

I tried Panda and indeed the call gets blocked ... interesting 

When I am looking at the logcat I can see that after the intent
InCallScreen was received that the phone application gets paused.

Now I am also curious how to achieve this ...

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.


On Sep 6, 11:01 pm, feeling3_4  wrote:
> Thanks Roman. Have you ever tried 
> thishttp://www.cyrket.com/package/com.dragon.pandafirewall
> ?
>
> the call blocking works. My G1 doesn't even ring.
>
> On Sep 7, 1:18 pm, "Roman ( T-Mobile USA)" 
> mobile.com> wrote:
> > I am not aware that you can intercept an incoming call only from SDK
> > level. Firewall programs which are claiming to block incoming calls
> > are not working on my phone.
>
> > If there is a mechanism out there, please let me know.
>
> > --
> > Roman Baumgaertner
> > Sr. SW Engineer-OSDC
> > ·T· · ·Mobile· stick together
> > The views, opinions and statements in this email are those of the
> > author solely in their individual capacity, and do not necessarily
> > represent those of T-Mobile USA, Inc.
>
> > On Sep 6, 8:50 pm, feeling3_4  wrote:
>
> > > Hi, all
>
> > >   I know there are some posts from the group have talked about this
> > > ( 
> > > likehttps://groups.google.com/group/android-developers/browse_thread/thre...
> > > andhttps://groups.google.com/group/android-beginners/browse_thread/threa...),
> > > but I can not find exactly the offical answer of this issue.
>
> > > in android market, there are some apps which can set up a black list
> > > and block the incoming call, seehttp://www.cyrket.com/search?q=block+call
> > > for details. is there something like backdoor or unkown api for
> > > blocking incoming call.
>
> > > any idea?  thanks .
>
>
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to block incoming call?

2009-09-06 Thread Kai

I tried Panda firewall.  The call blocking works.  My G1 doesn't even
ring.  The call goes straight to voicemail.

so there must be a way to do it.

On Sep 6, 10:18 pm, "Roman ( T-Mobile USA)"  wrote:
> I am not aware that you can intercept an incoming call only from SDK
> level. Firewall programs which are claiming to block incoming calls
> are not working on my phone.
>
> If there is a mechanism out there, please let me know.
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 6, 8:50 pm, feeling3_4  wrote:
>
> > Hi, all
>
> >   I know there are some posts from the group have talked about this
> > ( 
> > likehttps://groups.google.com/group/android-developers/browse_thread/thre...
> > andhttps://groups.google.com/group/android-beginners/browse_thread/threa...),
> > but I can not find exactly the offical answer of this issue.
>
> > in android market, there are some apps which can set up a black list
> > and block the incoming call, seehttp://www.cyrket.com/search?q=block+call
> > for details. is there something like backdoor or unkown api for
> > blocking incoming call.
>
> > any idea?  thanks .
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to block incoming call?

2009-09-06 Thread feeling3_4

Thanks Roman. Have you ever tried this 
http://www.cyrket.com/package/com.dragon.pandafirewall
?

the call blocking works. My G1 doesn't even ring.

On Sep 7, 1:18 pm, "Roman ( T-Mobile USA)"  wrote:
> I am not aware that you can intercept an incoming call only from SDK
> level. Firewall programs which are claiming to block incoming calls
> are not working on my phone.
>
> If there is a mechanism out there, please let me know.
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 6, 8:50 pm, feeling3_4  wrote:
>
> > Hi, all
>
> >   I know there are some posts from the group have talked about this
> > ( 
> > likehttps://groups.google.com/group/android-developers/browse_thread/thre...
> > andhttps://groups.google.com/group/android-beginners/browse_thread/threa...),
> > but I can not find exactly the offical answer of this issue.
>
> > in android market, there are some apps which can set up a black list
> > and block the incoming call, seehttp://www.cyrket.com/search?q=block+call
> > for details. is there something like backdoor or unkown api for
> > blocking incoming call.
>
> > any idea?  thanks .
>
>
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: How to block incoming call?

2009-09-06 Thread Roman ( T-Mobile USA)

I am not aware that you can intercept an incoming call only from SDK
level. Firewall programs which are claiming to block incoming calls
are not working on my phone.

If there is a mechanism out there, please let me know.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.



On Sep 6, 8:50 pm, feeling3_4  wrote:
> Hi, all
>
>   I know there are some posts from the group have talked about this
> ( likehttps://groups.google.com/group/android-developers/browse_thread/thre...
> andhttps://groups.google.com/group/android-beginners/browse_thread/threa...),
> but I can not find exactly the offical answer of this issue.
>
> in android market, there are some apps which can set up a black list
> and block the incoming call, seehttp://www.cyrket.com/search?q=block+call
> for details. is there something like backdoor or unkown api for
> blocking incoming call.
>
> any idea?  thanks .
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---