Log in or register to post comments

Getting Start Proper Tutorial

October 12, 2010 - 12:39am #1

I know we have the Getting Started section on the SDK section, and we have a few samples, but I still feel its unclear how to get start with your "own" project. Which libraries to link in? How to do so? How to start creating your native code? I really think a guide like this is needed, otherwise I cant see much following very soon...

Adam

Re: Getting Start Proper Tutorial

May 4, 2011 - 3:10pm #10

Looking forward to the tutorial documentation as mentioned Kim!

Re: Getting Start Proper Tutorial

October 25, 2010 - 8:18pm #9

Already double checked the name, and just ran the ADT update as well as the Android SDK. It still had the issue, but removing the project and readding it worked. I forgot it wasn't imported and was added directly so I accidentally deleted it and had to backstep to get the project back.

Eclipse thanks it can run it now so that's progress. I'll have to wait till I get a phone again to try it out.

Is there any reason why we add the sample directly instead of importing it?

Re: Getting Start Proper Tutorial

October 25, 2010 - 7:57pm #8

Don't try running the Shared project, it is compiled as a library for the other sample projects to include, and can't be run as an application. In Eclipse, make sure you have named the Shared project com_qualcomm_QCARSamples_Shared, this is required for the other projects to see it correctly. Also, make sure you have an updated version of the ADT (Android Developer Toolkit) in Eclipse. If you right-click on the Shared project in the Package Explorer and choose Properties > Android you should see an Is Library box that is checked.

Make sure you have built all the native shared libraries using ndk-build, as the Getting Started guide describes. In Eclipse, you may need to refresh each project to grab the compiled libraries (right-click, Refresh). It can also help to clean the projects in Eclipse and build them from scratch.

- Kim

Re: Getting Start Proper Tutorial

October 25, 2010 - 7:47pm #7

I take that back. When I try to run the Shared project, Eclipse tells me "Android library projects cannot be launched."
Using Android's Fix Project Properties, and using Eclipse's Clean didn't help. The project doesn't show any errors though.

ImageTargets does show errors and neither Fix Project Properties or Clean helped. In the Manifest it says that ImageTargets doesnt expand Activity. So I went into the java file and noticed that Activity hadn't been included. QCARSampleActivity.loadNativeLibaries(); isn't public so it can't be seen. mSplashScreenImageResource and mTextures are never created.

I'm not sure if these errors are from me not getting Shared compiled or not.

Re: Getting Start Proper Tutorial

October 25, 2010 - 6:33pm #6

I can't believe I didn't expand it. Everything else I did without a problem, so I just thought all the info was there on each Step. I should be in good shape now. I'm in between dev phones right now anyways so I can only get so far in the mean time.

Thanks

Re: Getting Start Proper Tutorial

October 25, 2010 - 5:52am #5

Which part are you stuck on? If you expand the contents under Step 3, you should find instructions for compiling the DSO and creating the Android APK. It should be enough information to help you compile and run the sample apps, but let us know if you feel that something particular is missing.

- Kim

Re: Getting Start Proper Tutorial

October 24, 2010 - 9:34pm #4

I'm stuck at Step 3: Compile and Run a QCAR sample app. It obviously isn't finished, but does anyone know how long it will be for a simple run down on how to compile and run an app? I'm planning to work on this next semester. Hopefully the documentation will get fleshed out in the next couple of months.

October 12, 2010 - 5:34am #3

Brilliant thanks. I was thinking of doing this!

Hope to show something soon then, and look forward to the new documentation!

Adam

October 12, 2010 - 5:19am #2

Further documentation is in the works. In the meanwhile, we have some simple suggestions for getting started:

Copy the ImageTargets project as a starting point for your own application. In the ImageTargets.cpp file you can replace the teapot rendering code with your own rendering. If you need to leverage the Android SDK (e.g. for touch handling) add this to the ImageTargets.java file. Between these two files, you can find examples of calling native functions from Java (see the onQCARInitializedNative function).

You can also study the Shared sample project for a deeper look at the SDK setup.

- Kim

Log in or register to post comments