Android Question Phone library with Kindle Fire

bobsimoneau

Member
Licensed User
Longtime User
I am trying to get my apps ready for the Kindle Fire HDX. Amazon has a test app to do preliminary test. My application fails with a ringtone detected error. See attachment. Any suggestions. I used the phone library as such:

If FirstTime Then
Dim p As Phone
If p.Model = "Kindle Fire" Then
Kindle = True
Else
Kindle = False
End If
 

Attachments

  • Error.jpg
    Error.jpg
    114.5 KB · Views: 283

bobsimoneau

Member
Licensed User
Longtime User
I guess that you are not using RingtoneManager, right?

Try these steps:
- Make a copy of Phone.xml and Phone.jar (to MyPhone.xml and MyPhone.jar)
- Open MyPhone.jar with a program such as 7zip.
- Open the folders until you see all the class files.
- Delete the two RingtoneManagerWrapper classes.
Thanks
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
I guess that you are not using RingtoneManager, right?

Try these steps:
- Make a copy of Phone.xml and Phone.jar (to MyPhone.xml and MyPhone.jar)
- Open MyPhone.jar with a program such as 7zip.
- Open the folders until you see all the class files.
- Delete the two RingtoneManagerWrapper classes.

@Erel, I'd like to upload my apps to Amazon too, but I also get the "your app is a ringtone" warning when I upload my APK.

I tried doing what you describe above, but when I open my duplicated Phone.jar (2.27), I can see all the classes, but I can't find anything with the phrase "ringtone" in it.

Here's what I see:

B4X:
CallLogWrapper$CallItem.class
CallLogWrapper.class
Contacts2Wrapper$Contact2.class
Contacts2Wrapper.class
ContactsWrapper$Contact.class
ContactsWrapper.class
PackageManagerWrapper.class
Phone$ContentChooser$1.class
Phone$ContentChooser.class
Phone$Email.class
Phone$LogCat$1.class
Phone$LogCat.class
Phone$PhoneAccelerometer$1.class
Phone$PhoneAccelerometer.class
Phone$PhoneCalls.class
Phone$PhoneId.class
Phone$PhoneIntents.class
Phone$PhoneOrientation$1.class
Phone$PhoneOrientation.class
Phone$PhoneSensors$1.class
Phone$PhoneSensors.class
Phone$PhoneSms.class
Phone$PhoneVibrate.class
Phone$PhoneWakeState.class
Phone$VoiceRecognition$1.class
Phone$VoiceRecognition.class
Phone.class
PhoneEvents$1.class
PhoneEvents$10.class
PhoneEvents$11.class
PhoneEvents$12.class
PhoneEvents$13.class
PhoneEvents$14.class
PhoneEvents$15.class
PhoneEvents$16.class
PhoneEvents$2.class
PhoneEvents$3.class
PhoneEvents$4.class
PhoneEvents$5.class
PhoneEvents$6.class
PhoneEvents$7.class
PhoneEvents$8.class
PhoneEvents$9.class
PhoneEvents$ActionHandler$1.class
PhoneEvents$ActionHandler.class
PhoneEvents$SMSInterceptor$1.class
PhoneEvents$SMSInterceptor.class
PhoneEvents.class
SmsWrapper$Sms.class
SmsWrapper.class

Any ideas? Thanks!
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
You have already deleted the two classes that call a Ringtone API.
That's the strange part - I've never touched the Phone library files before this. And when I go back to the original Phone library file (Phone.jar), it doesn't have Ringtone classes either.

Anyway, I'll recompile and test against Amazon in the next few days and report back. Thanks!
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
Ah, good catch. It looks like I have Phone libraries in the app's folder and in my "more libs" folder. And I have some other duplicates too (IME, JavaObject, etc.), probably from third-party libraries that included them.

I assume I should delete the duplicates from "more libs"?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
yes. Probably.
For the future you need to read carefully when you get an update from @Erel (or find it here in forum). He maybe say "place the files into the internal libs folder", maybe "place the files into the additional libs folder" :D

I have in mind i ran into the same trap while updating my httputils with the new okhttputils;

See here

If you want to use the new HttpUtils2 library you need to copy it to the internal libraries folder.
 
Upvote 0

Dave O

Well-Known Member
Licensed User
Longtime User
Just to confirm, once I got rid of the duplicate libs and removed RingtoneManager from my "Amazon" copy of the Phone lib, uploading to Amazon's testing service showed no complaints about ringtones. Thanks!
 
Upvote 0
Top