1

i need to capture the signal strength of available Gsm operators,i found we can do this INetworkQueryService aidl interface and this interface uses some of the callbacks which requires to import com.android.phone.INetworkQueryServiceCallback, when i import, i get Error as couldn't find import for class com.android.phone.INetworkQueryServiceCallback

In order to resolve the above issue i created the package with same qualifier and mapped the respective .java classes.But my confusion is since this packages are the part of android SDK is it necessary for me to create them manually and map each and every .java classes as well as don't it create any kind of performance overheads.

Please refer the below link to know what i am doing let me known is there better solution to achieve this issue.

Android: How do I get GSM signal strength for all available network operators

Community
  • 1
  • 1
user2107111
  • 735
  • 1
  • 6
  • 10

1 Answers1

1

You have to download .jar and include that to class path or add it to you project build path or as external library.You don't have this library in built you have to add it to your project.

You also need to read:

Android adding external libraries to project


You can see class here

Download Jar(Binary Download)

Community
  • 1
  • 1
akash
  • 22,664
  • 11
  • 59
  • 87
  • Hi Thank you so much but can you please tell me which jar to download among this three 1.Project metadata download 2.Binary download 3.Source download – user2107111 Jul 07 '14 at 06:00
  • hi still i am facing the issue at this line import com.android.internal.telephony.OperatorInfo; – user2107111 Jul 07 '14 at 07:13
  • This is my code. oneway interface INetworkQueryServiceCallback { void onQueryComplete(in List networkInfoArray, int status); } – user2107111 Jul 07 '14 at 07:20
  • i extracted the jar file and navigated to com.android.internal.telephony and noticed that there is no class found by name OperatorInfo.what should i need to do now. – user2107111 Jul 07 '14 at 07:35
  • still i am facing the same issue. – user2107111 Jul 07 '14 at 13:01
  • Have you added that `jar` to your project you have to first extract the downloaded .zip file and than use jar file.You can check in the link that the required class is there in jar. – akash Jul 07 '14 at 13:08
  • ya i have extracted and added it as jar to my lib folder Steps i followed Extract dowloaded jar->added addroid src.jar to lib->right click on project->properties->java build path->add jar-> selected jar from my project lib folder then ok.. is there anything i missed out.. – user2107111 Jul 10 '14 at 05:17
  • ya i have extracted and added it as jar to my lib folder Steps i followed Extract dowloaded jar->added addroid src.jar to lib->right click on project->properties->java build path->add jar-> selected jar from my project lib folder then ok.. is there anything i missed out.. – user2107111 Jul 10 '14 at 05:23
  • i checked the extracted files as well but still some classes are missing ,i already spent 5 days but still not able resolve pls help me out with some alternatives and one more thing there are different version of lib present in grepcode.com and the classes which i required is scattered among different version i mean to say all required classes are not present in single .jar files.so to resolve this issue i created a separate project added all the .java files from jar and tried to add missing classes to project in order to create lib which fulfills my requirement but still there is no luck.. – user2107111 Jul 10 '14 at 05:32
  • one more thing jar is present in both references library folder as well as android private libraries folder does it creates any prob coz though required class are present in library its throwing error as cannot resolve android.xyz.xyz... , – user2107111 Jul 10 '14 at 07:13
  • Hi Please tell me y is happening so i searched all around and tryed all the possible ways of adding external lib but still on luck,on cleaning the application error goes and on compilation again it throws error..couldn't find import for class com.android.internal.telephony.OperatorInfo – user2107111 Jul 11 '14 at 06:32
  • INetworkQueryServiceCallback inturn refers to operatorinfo class for more clarification pls download and check it once – user2107111 Jul 11 '14 at 11:50
  • Sorry!! Can't reproduce your issue as I tried my best so this is what I know. – akash Jul 11 '14 at 12:16
  • Please check it once i feel u can help me. – user2107111 Jul 15 '14 at 07:26