How do I begin working on the Project Tango? - android

after a couple of weeks I have been unable to get the android set of tools to a functioning level with c++ before and have been given the opportunity of using a project tango, and though that sounds awesome and wondrous and would open a world of opportunity for working with VR... I feel like I am stuck at step -4. My understanding is limited, so bear with me.
I stumbled upon the PCL built for running algorithms on point cloud data, it was open source and appeared like a wonderful solution, it is written in C++ and I have a mild understanding of both c++ and java.
I have tried using Eclipse and the NDK and actually managed to get a project 'deployed' to the tango, however upon attempting to edit any file in the project, java or c++, it breaks and will never deploy again.
Now I am trying to use Android Studio, and after following about 5 conflicting tutorials on 'how to get C++/ndk working in android studio' I have yet to get a working environment.
So here is my question, and we can start at step one, any help is appreciated. How does one get c++ and the PCL working on a google project tango, is there a better way for someone of my skill level? The end result is a mapped 3d space with the project tango, with exportable data sets of manageable size. I have seen it done in demos on youtube, but thus far, like i said, I am stuck on step -4.

we are working on converting all project to android studio based, for now, here is the walk around to get you started:
Open Android Studio, import the project from the repo you just cloned.
Take the motion-tracking-jni-example as the example, copy tango-gl-render, tango-service-sdk, and third-party into the motion-tracking-jni-example/app/src.
Run ndk-build in the motion-tracking-jni-example/app/src/main folder.
ndk will generate the libs folder, rename it to jniLibs.
Go to Android Studio, in build.gradle(Module:app) file, add line 'sourceSets.main.jni.srcDirs = []' to the defaultConfig section.
Just click the run button in Android Studio.
What we did here is basically disabled the Android Stdio's JNI compile and manually built it using ndk.

Start with unity3d, its easy to get a working demo with a week with Unity3D.
And support is very good, documentation is top notch.
Hope this will help.

Tango NDK Tutorial Will help but the basic layout is
Setup a new project
Create your Java activity
Create a JNI file to bridge Java to the C++
Create your C++ logic
Setup your Makefiles and Gradle (probably the most annoying part)

Related

IDE setup for development of react-native JSI native modules

JSI is about to become quite popular in native module development but there's still very little information on how to get started with it.
One of the things I'm wasting more of my time on is setting up an IDE to get IntelliSense / code completion with the c++ side of things.
I have both CLion and Android studio and i couldn't figure out a way to make it work at all. Android studio seems to just ignore the CMakeLists.txt file inside the android/ folder. On clion when loading the CMakeLists.txt file it just can't find half the variables and paths needed and if i manually set the variables via the settings it keeps giving errors on errors.
I'm pretty new to c++ development but i managed to setup a few c++ projects so far, but i have no idea how to do this for RN.
Basically, you need two IDEs, one for react-native's codes, and one for C++ code.
In my experience, Qt Creator IDE had best support for CMakeLists.txt as project, but give newer MSVC versions a try (they added support recently).
Also, VS Code was good for react-native.
But if you don't write much C++ code, simply use VS Code for both.

Building a Github library project locally in Android Studio 2

Like many a newbie I've been blindly clicking away in Android Studio 2 stumbling my way through building an app. Most of it just works so I've not really got my head into gradle.
Any road up, I've wanted to link into Strava and discovered that there were a couple of guys who had done the heavy lifting but on using a specific project, at the vital point of getting the data there is a coding problem. I thought the best approach would be to solve the problem and feedback.
So I downloaded the GitHub project in a zip and tried to do a standalone build and then things just didn't work. I think the basic problem is a) I don't know what I'm doing, and b) presumably the build on GitHub was done using different tools that are not set up for Android Studio.
So given that there is a working project on GitHub (specifically https://github.com/SweetzpotAS/StravaZpot-Android ) what are the dummy steps for getting that project to build locally in AS 2?
The problems I had are that on trying to open the project picking up the gradle file (couldn't find anything else to open in the root directory, the build didn't want to work - complaints about mixed projects. I stripped out the testing app and just tried to build the lib, but I didn't get a working lib in the output directory, just 2 25k stub aar files. Ideally I want to have that as a standalone project to build a local lib and then use that lib in my project (which I reckon is within my abilities!). Run out of Google search ideas!

Can I use Visual Studio as an IDE for cocos2d-x 3.0rc2, c++ development?

So I plan on building for Android with cocos2d-x 3.0rc2 and there isn't a whole lot of updated documentation on what all I'm supposed to do to get up and running. I have the whole environment set up already. I can run tests and make some basic sprites just by editing the C++ files in Notepad++, however I need to get to a point where I am actually set up in an IDE. There are tutorials of importing projects into ADT, which I have gotten to run but I cannot edit the *.cpp files from inside eclipse. Is that how I'm supposed to set up my environment? Do people usually just edit in a basic text editor and run from command line or is there something I'm missing.
I also opened up the Visual Studio solution that comes with a new project and inside that I have auto completion and it's a nice environment, but there is still the hassle with makefiles that I just can't get working. I tried using some of the extended features and using CocoStudio exports in my projects and the compiler won't have any of that. Is there just a lack of documentation for people who are not comfortable developing for Android already?
When I make a new class, or use a new include, do I have to manually add that that to a makefile? If so, where is somewhere that I can learn how that process works and be able to apply it to new situations?
I feel lost because I'm not too used to getting into all the 'nitty-gritty' bits of development.
If someone wants to help me out understanding all this, I would be immensely appreciative.
Thanks,
Vynlar
Visual Studio 2012 is supported. Here is documentation on setting up Cocos2d-x v3.0 with Visual Studio: http://cocos2d-x.org/wiki/How_to_run_cpp-tests_on_Windows
This question is like two years old, but if anyone hits it in search results there is now a Visual Studio project to target Android devices with Cocos2d-x. It's not integrated with the cocos template system, so it currently needs to be updated per cocos version. Currently it's for VS 2015 Update 3 and Cocos 3.12.
https://blogs.msdn.microsoft.com/vcblog/2016/07/12/cocos2d-x-visual-studio-android-project/
I was the developer on this, so I can be contacted with any questions.

Add android eclipse library to unity3d project

I have an android library in the form of an eclipse project that I want to integrate with unity3d. I know I can make a jar from eclipse and drop it in unity's plugins/android folder. However as I understand it that necessarily strips out the resources from the project.
If I export the unity game to an eclipse project, I can right-click and add the android project as a library. However I don't like this approach because it doesn't fit with our current automation process - which basically just script's unity's build dialog.
I'd like a way to tell unity that I want this eclipse project linked as an android library on export. Does anyone know a way to do that, or how to pack the resources into the jar or another way of getting this stuff to talk?
One possible way to go is using Unity's Build Player Pipeline. Depending on the platform you are working on you then have to set up a shell script or do your stuff in C#.
It's some year ago that I were a Java/Eclipse expert as I am working on iOS now. The Android Developers page shows some way to manipulate projects via command line.
Maybe the better way to go is using Eclipse switches like --import (s. 1st answer in Create an Eclipse project on the command line? and the link provided) but on the other hand I can't find the switch in the help pages.
Well, not really a bounty answer but maybe some inspiration :-)
The only real answer I've found is that in 4.2, you can drop an eclipse project in plugins/android and it will be linked correctly. Just have to hang on I suppose. :-/

Android NDK with Visual Studio

I'd like to build some native libraries for android using the NDK (native development kit), but i'd like to use Visual Studio 2010 to do it. I've googled quite a bit but haven't found any information on it. Does anyone have any experience with this and know the steps necessary to make this happen? I have CYGWin installed, made sure i get Make (per the NDK instructions), but i'm not really sure of the next steps in terms of setting up the project, compiler in visual studio, etc.
If anyone knows of any write-ups, tutorials, or links to sample projects, that would be awesome, as there isn't much on google yet.
thanks!
Here's another solution, which integrates the NDK fully within Visual Studio. No makefiles. It behaves like a proper Win32 project:
Here's an excellent blog post about how you can configure your environment to debug android NDK code using Visual Studio.
Visual Studio is officially not supported.
Some problems (but not limited to):
MSVS cannot create the proper ARM binaries
Android makefiles (.mk) are not supported by MSVS
There are however, third party solutions:
vs-android
VisualGDB
You might want to check out DS-5 as well, though it's not Visual Studio.
The answer depends on what kind of integration you require.
To just build the native Android code from Visual Studio you can create a new Makefile project, and make it run ndk-build.cmd when you press "build". If you would like to get the error messages mapped as well, you will need to parse the output of ndk-build.cmd and convert it to a format that Visual Studio can udnerstand.
If you want to debug your native Android code from Visual Studio, you will need a third party tool that will control ndk-gdb on behalf of Visual Studio and provide workarounds for several bugs (e.g. rebind breakpoints when libraries are loaded).
You can try our VisualGDB for Android tool that does exactly that - creates projects that wrap ndk-build and controls NDK debugger on behalf of Visual Studio. If you need more information, there is a step-by-step tutorial available.
I have not found a direct clean solution, here is my workaround.
I develop my native code on VS as a static library, and use some test project to try it as a console aplication.
When it is ok, from cygwin I use a little bash script that copies all needed files to the jni folder and launch the standard android ndk make command. (also copy some file to assets folder when needed), producing the executable in the right folder.
To use the pthreads I have linked my projects to pthreads-win32.
The only files I do not compile in VS are the jni code.
I hope this can help you.
There's also a couple of other third party alternatives for developing ANdroid apps with VS in addition to those above. There is the open source dot42 located at http://www.dot42.com and Remobjects, http://www.remobjects.com , which allows you to program in c#, Pascal, and Swift. I have played with the trial of Remobjects and am now starting to play around with dot42.
My use of the remobjects trial allowed me to recreate in c# the first five chapter projects in the textbook of the Android course I took. I haven't had the same success with dot42 so far but I need to find some time to really give it a chance.

Categories

Resources