[android-developers] Re: android Telephony API access levels

2010-03-18 Thread saru
Hi i am searching the same feature (specially accepting call) from
last 3 months but found nothing significant

1.Some tell to change android source code and relative permission to
avail this feature.(fruitless)
2.some tell you should build your own application to accept call. Can
you imagine how much low level working needed to implement this
application.
3.some tell me for key injection. But android was aware of it and
blocked such types of key injection. Possible in Black Berry
4. most people tell it is impossible in present version but Google
might consider it in heir future release.
5. There is no way to override the existing phone application. though
android says All applications are same. But i think it is not true in
case android built in phone application.

I m urging if any people reading this thread have any idea about it
Please share as it is a long desired question


On Mar 17, 1:56 pm, Venu toyv...@gmail.com wrote:
 Hi,

 I'm also having similar kind oftarget.

 But I didn't find any thing suitable for my requirement in SDK.

 How can I develope  a complete third party telephony application using
 SDK.
 [Dialing a call
  Answering an incoming call
  Call supplementary services
  etc., using SDK ]

 Can any one at least say possibilities YES/NO

 FYI: I am exactly looking for CTelephony equivalent in Android. Is is
 possible in Android 1.5 SDK ???

 -regards
 Bytes

 On Feb 15, 10:26 am, mike hasitharand...@gmail.com wrote:

  intelephonyAPI what are the access levels, can i change certain
  methods
  in other terms i wanted to run my application on top oftelephonyAPI.
  When a call comes or when dialing a  certain number i want to access
  my application and need to display my application output as well.

  so will i be able to run third party applications on top of API???
  can i be able to change native methods???
  what are the access levels ??

  regards,
  Randika



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


Re: [android-developers] Re: android Telephony API access levels

2010-03-18 Thread David Ashwood
The Fring Android app does much of this already - which indicates that it's
possible.

On 18 March 2010 07:09, saru sarucs...@gmail.com wrote:

 Hi i am searching the same feature (specially accepting call) from
 last 3 months but found nothing significant

 1.Some tell to change android source code and relative permission to
 avail this feature.(fruitless)
 2.some tell you should build your own application to accept call. Can
 you imagine how much low level working needed to implement this
 application.
 3.some tell me for key injection. But android was aware of it and
 blocked such types of key injection. Possible in Black Berry
 4. most people tell it is impossible in present version but Google
 might consider it in heir future release.
 5. There is no way to override the existing phone application. though
 android says All applications are same. But i think it is not true in
 case android built in phone application.

 I m urging if any people reading this thread have any idea about it
 Please share as it is a long desired question


 On Mar 17, 1:56 pm, Venu toyv...@gmail.com wrote:
  Hi,
 
  I'm also having similar kind oftarget.
 
  But I didn't find any thing suitable for my requirement in SDK.
 
  How can I develope  a complete third party telephony application using
  SDK.
  [Dialing a call
   Answering an incoming call
   Call supplementary services
   etc., using SDK ]
 
  Can any one at least say possibilities YES/NO
 
  FYI: I am exactly looking for CTelephony equivalent in Android. Is is
  possible in Android 1.5 SDK ???
 
  -regards
  Bytes
 
  On Feb 15, 10:26 am, mike hasitharand...@gmail.com wrote:
 
   intelephonyAPI what are the access levels, can i change certain
   methods
   in other terms i wanted to run my application on top oftelephonyAPI.
   When a call comes or when dialing a  certain number i want to access
   my application and need to display my application output as well.
 
   so will i be able to run third party applications on top of API???
   can i be able to change native methods???
   what are the access levels ??
 
   regards,
   Randika
 
 

 --
 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.comandroid-developers%2bunsubscr...@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

[android-developers] Re: android Telephony API access levels

2010-03-17 Thread Venu
Hi,

I'm also having similar kind of target.

But I didn't find any thing suitable for my requirement in SDK.

How can I develope  a complete third party telephony application using
SDK.
[Dialing a call
 Answering an incoming call
 Call supplementary services
 etc., using SDK ]

Can any one at least say possibilities YES/NO

FYI: I am exactly looking for CTelephony equivalent in Android. Is is
possible in Android 1.5 SDK ???

-regards
Bytes


On Feb 15, 10:26 am, mike hasitharand...@gmail.com wrote:
 intelephonyAPI what are the access levels, can i change certain
 methods
 in other terms i wanted to run my application on top oftelephonyAPI.
 When a call comes or when dialing a  certain number i want to access
 my application and need to display my application output as well.

 so will i be able to run third party applications on top of API???
 can i be able to change native methods???
 what are the access levels ??

 regards,
 Randika

-- 
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: Android Telephony

2009-11-16 Thread Adrian Juan
I agree with Istvan. And we should definetely get an answer from
Google about it.

On Nov 15, 10:54 pm, Istvan istvan.ket...@gmail.com wrote:
 So a developer expects to have 32 different values in the range of
 [0-31], since there is nothing else about the granularity there.

 It is true that on Android Developer Phone 1 (with Android 1.6) there
 are only the 2, 6, 12 and 25 values as results.

 This issue is quite similar to what is happening on Windows Mobile 6.1

 Since the 2 hardware are almost identical, I suspect that is the
 limitation of the hardware not the OS.


-- 
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: Android Telephony

2009-11-16 Thread Ken Adair
Agree with the posters above. Please advise.

-- 
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: Android Telephony

2009-11-15 Thread Istvan
Received signal strength or UNKNOWN_RSSI if unknown. For GSM, it is
in asu ranging from 0 to 31 (dBm = -113 + 2*asu). 0 means -113 dBm
or less and 31 means -51 dBm or greater. For UMTS, it is the Level
index of CPICH RSCP defined in TS 25.125.

So a developer expects to have 32 different values in the range of
[0-31], since there is nothing else about the granularity there.

It is true that on Android Developer Phone 1 (with Android 1.6) there
are only the 2, 6, 12 and 25 values as results.

This issue is quite similar to what is happening on Windows Mobile 6.1
OS on my HTC Toudh HD.
The function 
http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.status.systemstate.phonesignalstrength.aspx
gives only 0, 46, 74, 86, 100 values back.

Since the 2 hardware are almost identical, I suspect that is the
limitation of the hardware not the OS.

It would be good to get a clear answer from someone from Android,
because for me this is not acceptable:
 This is the way you get the signal strength.  The status bar uses the exact
 same information to show its bars.


-- Replied message --
From: Dianne Hackborn hack...@android.com
Date: Apr 6, 11:29 pm
Subject: Android Telephony
To: Android Developers


This is the way you get the signal strength.  The status bar uses the
exact
same information to show its bars.



On Mon, Apr 6, 2009 at 1:18 PM, Matthew matt...@troppertech.com
wrote:

 Hello,

 I am new to this Group.

 Thank you for your recommendation to avoid using unsupported
 techniques.

 I am trying to obtain the signal strength seen by the G1 phone.

 As you had referred to, I have implemented a PhoneStateListener and
 onSignalStrengthChanged (int asu).

 It looks like I am seeing only a few  returned asu values (e.g., 2, 6,
 12 and 25).

 I believe that the mapping of asu to dBm is as follows: -113dBm +
 2*asu. Therefore, it looks like the G1 phone is reporting dBm values
 of -109, -101, -89 and -63.

 Also, I see that the signal strength icon used by the G1 has four bars
 (I am assuming that each bar corresponds to one of the 2, 6, 12 and 25
 asu values).

 Question: do you know if there is a supported way to obtain signal
 strength (either as an asu measure or a direct dBm measure) with a
 higher level
 of granularity (that is, for example, in single asu steps or single
 dBm steps)?

 Thank you in advance for any help or comments.

 On Mar 31, 3:40 am, Dianne Hackborn hack...@android.com wrote:
  DO NOT DO THIS!!!

  Especially since there is a public API for this:

 http://developer.android.com/reference/android/telephony/PhoneStateLi...

  We've been through the whole don't use private APIs stuff enough times,
 so
  I'll just note:

  1. This is not a bit of an advanced topic, this is outright hacking a
  fragile kludge.
  2. Please do not recommend that people do this kind of stuff at least
  without the relevant caveats that it is not a supported thing to do and
 they
  can expect their app to break.
  3. Just because you get something to run on the current G1 today does not
  mean it is the right thing to do.

  On Thu, Mar 12, 2009 at 3:28 PM, mark.ka...@gmail.com wrote:

     This can be done, but it is a bit of an advanced topic. You'll need
   to use an internal class which is
   com.android.internal.telephony.PhoneStateIntentReceiver

   Grab this package, the .class files  from the cupcake source tree
   repository , (doesn't ship with the SDK) and add the classes to you're
   class path, and include in the /libs directory, or package them into
   your existent android.jar file.

   Code to get the signal strength is as follows:

   import com.android.internal.telephony.PhoneStateIntentReceiver;
   private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
   ..
   /// first initialize the PhoneStateIntentReceiver (assumes you're
   inside a class that extends Context)

   void initPhoneStateReciever()
      {
         phoneStateReciever = new  PhoneStateIntentReceiver(this, new
   Handler( getMainLooper()));
         phoneStateReciever.notifySignalStrength
   (EVENT_SIGNAL_STRENGTH_CHANGED);
         phoneStateReciever.registerIntent();
      }

   //to get the signal strength, use this method, or something similar

   void updateSignalStrength()
     {
             int signalDbm = phoneStateReciever.getSignalStrengthDbm();
             int signalAsu = phoneStateReciever.getSignalStrength();
            System.out.println(Time: +System.currentTimeMillis()+
   Signal Strength DB: +signalDbm+ strength Asu: +signalAsu);
     }

   The use of internal classes is not officially supported, and you'll
   need to grab the .class files from the source repo, but I do actually
   have code that implements and is tested on the G1. Refer to other
   threads on options for getting the code and setting up your
   development environment to use internal classes. Good luck!

                                     Mark

   On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com 

[android-developers] Re: Android Telephony

2009-04-06 Thread Matthew

Hello,

I am new to this Group.

Thank you for your recommendation to avoid using unsupported
techniques.

I am trying to obtain the signal strength seen by the G1 phone.

As you had referred to, I have implemented a PhoneStateListener and
onSignalStrengthChanged (int asu).

It looks like I am seeing only a few  returned asu values (e.g., 2, 6,
12 and 25).

I believe that the mapping of asu to dBm is as follows: -113dBm +
2*asu. Therefore, it looks like the G1 phone is reporting dBm values
of -109, -101, -89 and -63.

Also, I see that the signal strength icon used by the G1 has four bars
(I am assuming that each bar corresponds to one of the 2, 6, 12 and 25
asu values).

Question: do you know if there is a supported way to obtain signal
strength (either as an asu measure or a direct dBm measure) with a
higher level
of granularity (that is, for example, in single asu steps or single
dBm steps)?

Thank you in advance for any help or comments.


On Mar 31, 3:40 am, Dianne Hackborn hack...@android.com wrote:
 DO NOT DO THIS!!!

 Especially since there is a public API for this:

 http://developer.android.com/reference/android/telephony/PhoneStateLi...

 We've been through the whole don't use private APIs stuff enough times, so
 I'll just note:

 1. This is not a bit of an advanced topic, this is outright hacking a
 fragile kludge.
 2. Please do not recommend that people do this kind of stuff at least
 without the relevant caveats that it is not a supported thing to do and they
 can expect their app to break.
 3. Just because you get something to run on the current G1 today does not
 mean it is the right thing to do.





 On Thu, Mar 12, 2009 at 3:28 PM, mark.ka...@gmail.com wrote:

    This can be done, but it is a bit of an advanced topic. You'll need
  to use an internal class which is
  com.android.internal.telephony.PhoneStateIntentReceiver

  Grab this package, the .class files  from the cupcake source tree
  repository , (doesn't ship with the SDK) and add the classes to you're
  class path, and include in the /libs directory, or package them into
  your existent android.jar file.

  Code to get the signal strength is as follows:

  import com.android.internal.telephony.PhoneStateIntentReceiver;
  private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
  ..
  /// first initialize the PhoneStateIntentReceiver (assumes you're
  inside a class that extends Context)

  void initPhoneStateReciever()
     {
        phoneStateReciever = new  PhoneStateIntentReceiver(this, new
  Handler( getMainLooper()));
        phoneStateReciever.notifySignalStrength
  (EVENT_SIGNAL_STRENGTH_CHANGED);
        phoneStateReciever.registerIntent();
     }

  //to get the signal strength, use this method, or something similar

  void updateSignalStrength()
    {
            int signalDbm = phoneStateReciever.getSignalStrengthDbm();
            int signalAsu = phoneStateReciever.getSignalStrength();
           System.out.println(Time: +System.currentTimeMillis()+
  Signal Strength DB: +signalDbm+ strength Asu: +signalAsu);
    }

  The use of internal classes is not officially supported, and you'll
  need to grab the .class files from the source repo, but I do actually
  have code that implements and is tested on the G1. Refer to other
  threads on options for getting the code and setting up your
  development environment to use internal classes. Good luck!

                                    Mark

  On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com wrote:
   Hi

   I want to find the network signal strength for my app.
   But I cant find the api for it.

   Do anybody know how to find the signal strength of the phone?

   Thanks

 --
 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.  All such questions should be posted on public
 forums, where I and others can see and answer them.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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: Android Telephony

2009-04-06 Thread Dianne Hackborn
This is the way you get the signal strength.  The status bar uses the exact
same information to show its bars.

On Mon, Apr 6, 2009 at 1:18 PM, Matthew matt...@troppertech.com wrote:


 Hello,

 I am new to this Group.

 Thank you for your recommendation to avoid using unsupported
 techniques.

 I am trying to obtain the signal strength seen by the G1 phone.

 As you had referred to, I have implemented a PhoneStateListener and
 onSignalStrengthChanged (int asu).

 It looks like I am seeing only a few  returned asu values (e.g., 2, 6,
 12 and 25).

 I believe that the mapping of asu to dBm is as follows: -113dBm +
 2*asu. Therefore, it looks like the G1 phone is reporting dBm values
 of -109, -101, -89 and -63.

 Also, I see that the signal strength icon used by the G1 has four bars
 (I am assuming that each bar corresponds to one of the 2, 6, 12 and 25
 asu values).

 Question: do you know if there is a supported way to obtain signal
 strength (either as an asu measure or a direct dBm measure) with a
 higher level
 of granularity (that is, for example, in single asu steps or single
 dBm steps)?

 Thank you in advance for any help or comments.


 On Mar 31, 3:40 am, Dianne Hackborn hack...@android.com wrote:
  DO NOT DO THIS!!!
 
  Especially since there is a public API for this:
 
  http://developer.android.com/reference/android/telephony/PhoneStateLi...
 
  We've been through the whole don't use private APIs stuff enough times,
 so
  I'll just note:
 
  1. This is not a bit of an advanced topic, this is outright hacking a
  fragile kludge.
  2. Please do not recommend that people do this kind of stuff at least
  without the relevant caveats that it is not a supported thing to do and
 they
  can expect their app to break.
  3. Just because you get something to run on the current G1 today does not
  mean it is the right thing to do.
 
 
 
 
 
  On Thu, Mar 12, 2009 at 3:28 PM, mark.ka...@gmail.com wrote:
 
 This can be done, but it is a bit of an advanced topic. You'll need
   to use an internal class which is
   com.android.internal.telephony.PhoneStateIntentReceiver
 
   Grab this package, the .class files  from the cupcake source tree
   repository , (doesn't ship with the SDK) and add the classes to you're
   class path, and include in the /libs directory, or package them into
   your existent android.jar file.
 
   Code to get the signal strength is as follows:
 
   import com.android.internal.telephony.PhoneStateIntentReceiver;
   private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
   ..
   /// first initialize the PhoneStateIntentReceiver (assumes you're
   inside a class that extends Context)
 
   void initPhoneStateReciever()
  {
 phoneStateReciever = new  PhoneStateIntentReceiver(this, new
   Handler( getMainLooper()));
 phoneStateReciever.notifySignalStrength
   (EVENT_SIGNAL_STRENGTH_CHANGED);
 phoneStateReciever.registerIntent();
  }
 
   //to get the signal strength, use this method, or something similar
 
   void updateSignalStrength()
 {
 int signalDbm = phoneStateReciever.getSignalStrengthDbm();
 int signalAsu = phoneStateReciever.getSignalStrength();
System.out.println(Time: +System.currentTimeMillis()+
   Signal Strength DB: +signalDbm+ strength Asu: +signalAsu);
 }
 
   The use of internal classes is not officially supported, and you'll
   need to grab the .class files from the source repo, but I do actually
   have code that implements and is tested on the G1. Refer to other
   threads on options for getting the code and setting up your
   development environment to use internal classes. Good luck!
 
 Mark
 
   On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com wrote:
Hi
 
I want to find the network signal strength for my app.
But I cant find the api for it.
 
Do anybody know how to find the signal strength of the phone?
 
Thanks
 
  --
  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.  All such questions should be posted on public
  forums, where I and others can see and answer them.- Hide quoted text -
 
  - Show quoted text -
 



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

[android-developers] Re: Android Telephony

2009-04-01 Thread TAKEphONE

Hi,

Is there a way to read the transmitter signal strength ?

TIA


--~--~-~--~~~---~--~~
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: Android Telephony

2009-03-31 Thread bins...

hi..

this all package is now not there now thery directly give signal
values,,,no need to register the intent receiver...


this is the code


TelephonyManager  SignalManager =   (TelephonyManager)getSystemService
(Context.TELEPHONY_SERVICE);
gnalManager.listen(signalListener,
PhoneStateListener.LISTEN_SIGNAL_STRENGTH);


PhoneStateListener signalListener=new PhoneStateListener()
{
public void onSignalStrengthChanged(int asu)
{
Log.e(onSignalStrengthChanged: +asu, hello+Status);
}
};


write this code inside the oncreate function.

cheers..

by bins...


On Mar 13, 3:28 am, mark.ka...@gmail.com wrote:
    This can be done, but it is a bit of an advanced topic. You'll need
 to use an internal class which is
 com.android.internal.telephony.PhoneStateIntentReceiver

 Grab this package, the .class files  from the cupcake source tree
 repository , (doesn't ship with the SDK) and add the classes to you're
 class path, and include in the /libs directory, or package them into
 your existent android.jar file.

 Code to get the signal strength is as follows:

 import com.android.internal.telephony.PhoneStateIntentReceiver;
 private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
 ..
 /// first initialize the PhoneStateIntentReceiver (assumes you're
 inside a class that extends Context)

 void initPhoneStateReciever()
     {
        phoneStateReciever = new  PhoneStateIntentReceiver(this, new
 Handler( getMainLooper()));
        phoneStateReciever.notifySignalStrength
 (EVENT_SIGNAL_STRENGTH_CHANGED);
        phoneStateReciever.registerIntent();
     }

 //to get the signal strength, use this method, or something similar

 void updateSignalStrength()
    {
            int signalDbm = phoneStateReciever.getSignalStrengthDbm();
            int signalAsu = phoneStateReciever.getSignalStrength();
           System.out.println(Time: +System.currentTimeMillis()+
 Signal Strength DB: +signalDbm+ strength Asu: +signalAsu);
    }

 The use of internal classes is not officially supported, and you'll
 need to grab the .class files from the source repo, but I do actually
 have code that implements and is tested on the G1. Refer to other
 threads on options for getting the code and setting up your
 development environment to use internal classes. Good luck!

                                    Mark

 On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com wrote:

  Hi

  I want to find the network signal strength for my app.
  But I cant find the api for it.

  Do anybody know how to find the signal strength of the phone?

  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: Android Telephony

2009-03-31 Thread Dianne Hackborn
DO NOT DO THIS!!!

Especially since there is a public API for this:

http://developer.android.com/reference/android/telephony/PhoneStateListener.html

We've been through the whole don't use private APIs stuff enough times, so
I'll just note:

1. This is not a bit of an advanced topic, this is outright hacking a
fragile kludge.
2. Please do not recommend that people do this kind of stuff at least
without the relevant caveats that it is not a supported thing to do and they
can expect their app to break.
3. Just because you get something to run on the current G1 today does not
mean it is the right thing to do.

On Thu, Mar 12, 2009 at 3:28 PM, mark.ka...@gmail.com wrote:



   This can be done, but it is a bit of an advanced topic. You'll need
 to use an internal class which is
 com.android.internal.telephony.PhoneStateIntentReceiver

 Grab this package, the .class files  from the cupcake source tree
 repository , (doesn't ship with the SDK) and add the classes to you're
 class path, and include in the /libs directory, or package them into
 your existent android.jar file.

 Code to get the signal strength is as follows:

 import com.android.internal.telephony.PhoneStateIntentReceiver;
 private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
 ..
 /// first initialize the PhoneStateIntentReceiver (assumes you're
 inside a class that extends Context)

 void initPhoneStateReciever()
{
   phoneStateReciever = new  PhoneStateIntentReceiver(this, new
 Handler( getMainLooper()));
   phoneStateReciever.notifySignalStrength
 (EVENT_SIGNAL_STRENGTH_CHANGED);
   phoneStateReciever.registerIntent();
}

 //to get the signal strength, use this method, or something similar

 void updateSignalStrength()
   {
   int signalDbm = phoneStateReciever.getSignalStrengthDbm();
   int signalAsu = phoneStateReciever.getSignalStrength();
  System.out.println(Time: +System.currentTimeMillis()+
 Signal Strength DB: +signalDbm+ strength Asu: +signalAsu);
   }


 The use of internal classes is not officially supported, and you'll
 need to grab the .class files from the source repo, but I do actually
 have code that implements and is tested on the G1. Refer to other
 threads on options for getting the code and setting up your
 development environment to use internal classes. Good luck!

   Mark



 On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com wrote:
  Hi
 
  I want to find the network signal strength for my app.
  But I cant find the api for it.
 
  Do anybody know how to find the signal strength of the phone?
 
  Thanks
 



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



[android-developers] Re: Android Telephony

2009-03-12 Thread mark . kahrl


   This can be done, but it is a bit of an advanced topic. You'll need
to use an internal class which is
com.android.internal.telephony.PhoneStateIntentReceiver

Grab this package, the .class files  from the cupcake source tree
repository , (doesn't ship with the SDK) and add the classes to you're
class path, and include in the /libs directory, or package them into
your existent android.jar file.

Code to get the signal strength is as follows:

import com.android.internal.telephony.PhoneStateIntentReceiver;
private static final int EVENT_SIGNAL_STRENGTH_CHANGED = 200;
..
/// first initialize the PhoneStateIntentReceiver (assumes you're
inside a class that extends Context)

void initPhoneStateReciever()
{
   phoneStateReciever = new  PhoneStateIntentReceiver(this, new
Handler( getMainLooper()));
   phoneStateReciever.notifySignalStrength
(EVENT_SIGNAL_STRENGTH_CHANGED);
   phoneStateReciever.registerIntent();
}

//to get the signal strength, use this method, or something similar

void updateSignalStrength()
   {
   int signalDbm = phoneStateReciever.getSignalStrengthDbm();
   int signalAsu = phoneStateReciever.getSignalStrength();
  System.out.println(Time: +System.currentTimeMillis()+
Signal Strength DB: +signalDbm+ strength Asu: +signalAsu);
   }


The use of internal classes is not officially supported, and you'll
need to grab the .class files from the source repo, but I do actually
have code that implements and is tested on the G1. Refer to other
threads on options for getting the code and setting up your
development environment to use internal classes. Good luck!

   Mark



On Mar 11, 7:49 am, Shrikant Agrawal shrikant...@gmail.com wrote:
 Hi

 I want to find the network signal strength for my app.
 But I cant find the api for it.

 Do anybody know how to find the signal strength of the phone?

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