mehrvarz / webcall-android

WebCall for Android - Web-Telephony P2P Messaging File-Exchange E2E-Encryption No-SIM
GNU General Public License v3.0
128 stars 14 forks source link

can't change ringtone with Android Studio #15

Closed NCHU611A closed 1 year ago

NCHU611A commented 1 year ago

Hi, I use Android Studio to open the webcall-android folder(I downloaded the zip archive of Releases/v1.1.8 amd unzip it.). I want to change the phone ringtone. So I replaced ringing.ogg (/src/main/res/raw/ringing.ogg) with a different music (I overwritten the original file with the same file name). When I tested it on the emulator built into Android Studio, the phone's ringtone was indeed changed. But when I build the APK(Build > Generate Signed Bundle / APK...) and install it on my mobile phone, the phone ringtone is the original phone ringtone. This is really strange. Because I have deleted the original ringtone file, but the APK I built has the original ringtone file.

mehrvarz commented 1 year ago

When I tested it on the emulator built into Android Studio, the phone's ringtone was indeed changed. But when I build the APK(Build > Generate Signed Bundle / APK...) and install it on my mobile phone, the phone ringtone is the original phone ringtone.

If your new ringtone is not an actual OGG file, you may need to first convert it to OGG (not just rename it to OGG). Physical Android devices can be super picky about these things, much more than desktop OS's.

NCHU611A commented 1 year ago

I have converted my ringtone file from .mp3 file to .ogg file. I have tested my converted .ogg file and it works fine.

NCHU611A commented 1 year ago

Hi, I found that when I change the 1980-phone-ringing.mp3 file in the webcall/webroot/callee/ folder, the ringtone of my Android WebCall APP will also change (using my own webcall server).

So I have no problem now.

Thank you.

But I don't understand what this file (/src/main/res/raw/ringing.ogg) is for?

mehrvarz commented 1 year ago

But I don't understand what this file (/src/main/res/raw/ringing.ogg) is for?

This should be the ringtone you will hear if you swipe-kill the activity (which will wipe the web client from memory) and then receive a call.

NCHU611A commented 1 year ago

I see. thank you!