Log in or register to post comments

Is that possbile to use same im source code in two different application name?

March 16, 2011 - 12:21am #1

Dear Admin and Everybody,

Is that possbile to change package name in Imagetarget so that I can use
same source code(ImageTarget) in two different application name for my interest.

That means I want to use ImageTarget as another copy (with new name ) in my phone.

I already tried rename com.qualcomm.QCARSamples.ImageTargets (default package) to com.qualcomm.QCARSamples.ImageTargetstest
from src . but it gives error during renaming in Eclipse.

the error reason is: getopenglesversionNative()intype"com.qualcomm.QCARSamples.ImageTargets.ImageTargets is native..running the modified program will cause unsatisfied error"

Basically for Android we can use same source code in two applications name by just changing package name.

So is there any suggestions/help avaliable to change ImageTarget package name for using same source code in two different application name.

Thanks

Regards
Rassall

Re: Is that possbile to use same im source code in two different

February 22, 2012 - 6:18pm #6

You can't run in the emulator, the app must be run on a device.

If you delete the VirtualButtons.apk from the bin folder is it recreated each time? It might just be left over from the first build.

If you are still getting errors when running on a device please look for errors in the log. You can use the DDMS perspective in Eclipse to see the log.

- Kim

Re: Is that possbile to use same im source code in two different

February 22, 2012 - 1:24am #5

i tried renaming my virtualbuttons app using the solution suggested above, but the app forces close when run on the emulator, and also when i go into the bin folder after running the app to deploy the apk file into my device, i find that 2 apk files are made, one named as ARdemo.apk which is the new name that i wanted and along with it the original VirtualButtons.apk.
is there any solution to my problem??? i want my project to be named as ARdemo plzzz help :(

Re: Is that possbile to use same im source code in two different

March 17, 2011 - 5:59am #4

Do you mean the AR Extension for Unity 3? Unity is a popular game development tool: http://unity3d.com

Our extension makes it easy to add QCAR functionality to a Unity application.

- Kim

Re: Is that possbile to use same im source code in two different

March 16, 2011 - 11:17pm #3

Thanks Kim,

Its working now. Basically I already changes the above functions name before but still it was not working. Today I tried to do the same change in fresh image target program and now its working.

One another questions:

What is the basic difference between qcar sdk and AR extension sdk 3 in qualcomm. their vesion history looks same features..

Thanks
Rassall

Re: Is that possbile to use same im source code in two different

March 16, 2011 - 6:07am #2

Sure, you can do this, there is one extra step though. After changing the package name in Eclipse, you also need to change the package name in the native function signatures (that's what the warning is about). So for the ImageTargets sample, open ImageTargets.cpp and replace this:

Java_com_qualcomm_QCARSamples_ImageTargets_

with this

Java_com_qualcomm_QCARSamples_ImageTargetstest_

for each JNI exported function. Then rebuild the native code using ndk-build, refresh the Eclipse project, and try running it.

- Kim

Log in or register to post comments