Are you taking internal code from the telephony package and linking it
directly in your application?  If so, that will probably not work
because your application does not have the necessary permissions
required for accessing the telephony system.

Mike

On Thu, Apr 30, 2009 at 7:48 PM, alexdonnini <alessdonn...@gmail.com> wrote:
>
> Hello,
>
> Thanks for the response.
>
> In my application's source folder, I do have a
> com.android.internal.telephony
> package containing the necessary modules:
> IPhoneStateListener.aidl
> IPhoneSubInfo.aidl
> ITelephony.aidl
> ITelephonyRegistry.aidl
> IPhoneStateListener.java
> IPhoneSubInfo.java
> ITelephony.java
> ITelephonyRegistry.java
>
> In the copy of TelephonyManager I use, I have the following import
> statements (as expected, without them TelephonyManager reports an
> error):
> import com.android.internal.telephony.IPhoneStateListener;
> import com.android.internal.telephony.IPhoneSubInfo;
> import com.android.internal.telephony.ITelephony;
> import com.android.internal.telephony.ITelephonyRegistry;
>
> I have also made sure that the standard
> com.android.internal.telephony
> be not included in the library referenced by the application
> (otherwise it does not build)
>
> Except for the (failed) attempt to use getNeighboringCellInfo(), the
> application works without problems. All calls to the copy of
> TelephonyManager I use work.
>
> If, as you say, the application cannot find getNeighboringCellInfo(),
> wouldn't the same problem occur with other TelephonyManager functions?
>
> Thanks for your help.
>
> Alex Donnini
> On Apr 30, 5:03 pm, fadden <fad...@android.com> wrote:
>> On Apr 29, 8:54 pm, alexdonnini <alessdonn...@gmail.com> wrote:
>>
>> > Could someone please explain to me why the public
>> > getNeighboringCellInfo() method in TelephonyManager.java causes my
>> > application to crash (see error log below)?
>> [...]
>> > 04-29 23:46:05.754: WARN/dalvikvm(5854): VFY: unable to resolve
>> > interface method 23808: Lcom/android/internal/telephony/
>> > ITelephony;.getNeighboringCellInfo ()Ljava/util/List;
>> > 04-29 23:46:05.754: WARN/dalvikvm(5854): VFY:  rejecting opcode 0x72
>> > at 0x0004
>> > 04-29 23:46:05.754: WARN/dalvikvm(5854): VFY:  rejected Lcom/android/
>> > locationtest/TelephonyManager;.getNeighboringCellInfo ()Ljava/util/
>> > List;
>> > 04-29 23:46:05.754: WARN/dalvikvm(5854): Verifier rejected class Lcom/
>> > android/locationtest/TelephonyManager;
>>
>> com.android.locationtest.TelephonyManager.getNeighboringCellInfo tried
>> to use
>> com.android.internal.telephony.ITelephony.getNeighboringCellInfo, but
>> couldn't find it.
>>
>> Normally the call to the "internal" package happens from
>> com.android.telephony.TelephonyManager.getNeighboringCellInfo.
>>
>> Is the "locationtest" package yours?  Is there some weird class loader
>> stuff going on?
> >
>



-- 
Mike Lockwood
Google android team

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

Reply via email to