linphone-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-users] Linphone-android: Rename Application Package causes


From: Andrew Diamond
Subject: Re: [Linphone-users] Linphone-android: Rename Application Package causes app crash when pressing dial button
Date: Mon, 16 Jul 2012 02:39:59 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Winona Kwok <kwok.winona <at> gmail.com> writes:

> 
> 
> Hi All,Thanks for your replies and suggestions. I have managed to change the
package name. I have to manually go to the ToggleImageButton.java class to
change private static final String ns =
"http://schemas.android.com/apk/res/org.linphone";to private static final String
ns = "http://schemas.android.com/apk/res/myapp.package";;
> On Thu, May 3, 2012 at 4:10 PM, Erhan Tepe <birliktepe <at> gmail.com>
wrote:Did you only change the package name in the manifest file? As far as i
know, you should also rename all org.linphone packages, and i think there should
be some extra work with the jni file since the functions in it depends on the
package names. For instance, if you check the linphonecore_jni.cc file, you 
have;
> 
> 
> 
> 
> 
> extern "C" jboolean
Java_org_linphone_core_LinphoneCoreImpl_isInComingInvitePending(        JNIEnv* 
 env
> 
> 
>               ,jobject  thiz
>               ,jlong lc) {
> 
>       return linphone_core_inc_invite_pending((LinphoneCore*)lc);
> }
> 
> So you might wanna replace all the "org_linphone" with your new package name
in your jni file.
> 
> 
> 
> 
> On Wed, May 2, 2012 at 7:03 AM, Winona Kwok <kwok.winona <at> gmail.com> 
> wrote:
> 
> 
> 
> 
> 
> Hi Developers,I would like to rename my Linphone-android application package
to my own application package name. However after renaming, when I entered the
number and press the dial button, the app crashes. May I know why this is
happening? Or is there any other way to change my application package to my
desired name for the app? Thanks a lot! 
> -- Best Regards,Winona Kwok
> 
> _______________________________________________
> Linphone-users mailing listLinphone-users <at>
nongnu.orghttps://lists.nongnu.org/mailman/listinfo/linphone-users
> 
> 
> 
> 
> _______________________________________________
> Linphone-users mailing listLinphone-users <at>
nongnu.orghttps://lists.nongnu.org/mailman/listinfo/linphone-users
> 
> 
> -- Best Regards,Winona Kwok
> 
> 
> _______________________________________________
> Linphone-users mailing list
> Linphone-users <at> nongnu.org
> https://lists.nongnu.org/mailman/listinfo/linphone-users
> 


I've looked into this a bit more and you actually don't have to change all the
references to org.linphone and the jni files to alter the package.  If you right
click on your project and go to the Android Tools and then "Rename Application
Package" it will do most of what is needed (mostly generation of the new "R"
files).  It isn't perfect and you'll have to follow your red errors to update
some of the imports or direct references to the "R" files to get it correct with
your new package name.  Then, like Winona Kwok said, you'll have to manually
alter the "ns" String in ToggleImageButton.java.  If you don't, you'll have it
crash when it tries to update the screen during calls.

Andrew Diamond, MD





reply via email to

[Prev in Thread] Current Thread [Next in Thread]