Changing the package name of the Android application in Android Studio

eht
Posts: 8
Joined: Fri Aug 09, 2019 5:18 pm

Post

Hello everyone,

I hope you're doing well. I'm new here.

I designed an electronic card using Supla services and I also wanted to customize the mobile application's appearance with my colors. So, I downloaded the source code provided by Supla and after modifying it in Android Studio, everything worked correctly.

However, I wanted to perform a final step by changing the package name, and that's where I encountered a problem. After changing the package name of the Android application in Android Studio, and after compiling and installing it on my mobile phone, it seemed successful. Then, I filled in the following information - email address, ID, password, and server address - then clicked OK, but the application remains stuck on "connecting".

Can you help me? Is it possible to change the package name of the Android application? If so, I request your assistance.

Best regards,

Eric
User avatar
pzygmunt
Posts: 18632
Joined: Tue Jan 19, 2016 9:26 am
Location: Paczków

Post

Changing the package name will cause native (JNI) code to stop working. You would also have to modify it and recompile it.
https://github.com/SUPLA/supla-core/tre ... ndroid/jni


Remember to share the sources of the modified application.
User avatar
lesny8
Posts: 2852
Joined: Mon Dec 11, 2017 9:43 pm

Post

If you want to modify the application and install it alongside the official one, all you need to do is change the application ID here
https://github.com/SUPLA/supla-android/ ... le.kts#L19
Czekam na kolejne Supla Offline Party 👍
eht
Posts: 8
Joined: Fri Aug 09, 2019 5:18 pm

Post

pzygmunt wrote: Sun Feb 26, 2023 11:29 am Changing the package name will cause native (JNI) code to stop working. You would also have to modify it and recompile it.
https://github.com/SUPLA/supla-core/tre ... ndroid/jni


Remember to share the sources of the modified application.
Thank you very much for your response and for the link to the native code (JNI) that needs to be modified in case of a package name change. I will try to modify and recompile the native code in addition to the Java code of the application. And I will certainly share the sources of the modified application. Thanks again for your help.
Last edited by eht on Sun Feb 26, 2023 12:09 pm, edited 1 time in total.
eht
Posts: 8
Joined: Fri Aug 09, 2019 5:18 pm

Post

lesny8 wrote: Sun Feb 26, 2023 11:33 am If you want to modify the application and install it alongside the official one, all you need to do is change the application ID here
https://github.com/SUPLA/supla-android/ ... le.kts#L19
Thank you very much for your response and for the link to the configuration file where I can change the application ID. I will try to modify the application ID and install it alongside the official application. Thanks again for your help.

Return to “General discussion”