Customizing Android - android

I want to use Android for a system I have in order to use it as an embedded system that would run a specific application (which runs in chrome browser). However, this will not use Android in ordinary way, but rather hack around it so that libraries like OpenCV and packages like Chromium can be installed on the Android's Linux kernel. In addition, I would also need to figure out a way that would allow a USB camera to be supported.
I have done some research on this, but I am getting nowhere. Would somebody recommend resources that are relevant to this issue, or suggestions on how to approach it? Your feedback would be much appreciated.
Edit1: I am not intending for this question to be too broad. I only want to get more ideas on how you add libraries like OpenCV to Android, and whether there is a way to install the chrome browser as well.
Edit2: the Android system is on the Snapdragon platform.

Both Chromium and OpenCV can be built on Linux, have you tried compiling them from source on Android and failed? What error did you get? Here's a link for cross-compiling Chrome for ARM processors:
http://code.google.com/p/chromium/wiki/LinuxChromiumArm
I would use http://www.android-x86.org/ first and see if it works there before trying to run it on ARM so that you can fail faster if it doesn't work.

You might want to spend some time with ROM hackers to get more insight. Ideally, you want to find some people who are doing something similar so you can work with them. Take a look at:
http://forum.cyanogenmod.com/
http://forum.xda-developers.com/
A lot of what those guys are doing does not apply to what you are looking for, but they do get much deeper into the OS than most programmers. You might get lucky, and not have to modify the Android source code yourself as thinksteep mentions.

Related

Android, how to use phone's SQLite from C++?

I've developed a SQLite wrapper for React Native using C++. The easiest way to get it working was to include the SQLite amalgamation in the sources. This however increases the bundle size significantly. So I want to give the users the option to use the phone's embedded SQLite version.
The iOS version is working (I exclude the sources if an environment flag is present). Android seems a lot more complicated though. Most of the answers I find on google recommend using the amalgamation path. It seems however it is possible to use the phone's SQLite version (it comes by default with the NDK).
I'm currently compiling the amalgamation via CMake.
I'm an Android noobie, would someone explain it like I'm 5 how can I link/access the SQLite headers from my NDK C++ code? Maybe I should just leave the sqlite.h header file and it will link with the phone's version?
EDIT 1: It seems leaving the header file only, does not work. I've also ran into this Hacker News thread. Some of the comments seem to suggest it is not really possible to access things like curl/sqlite/etc from the NDK code. Any thoughts?
Thanks a lot!
Edit 2: I found a link that might work https://blog.katastros.com/a?ID=00200-fd6cd935-b779-4f44-9b4c-efad582167e1
After much fumbling around I've come to the conclusion there is no way to achieve linking the phones sqlite via c++. It is also probably best so, old android versions have outdated versions, vendors also modify the running sqlite versions and they are full of old bugs and broken stuff.

A few questions about webRTC on android

I have a few questions about webRTC on android. I can say I'm new about android and webRTC but I can also say I made tooo much research about webRTC on android. But still have a few questions. (some of them because of I'm new, and some of them because of I'm okey but not fully)
I'm trying to make an android app which is going to communicate between web browser (first choice is chrome) and android device directly (p2p we can say). So I made too much research and I found webRTC is good for me. Do you advise me something other or is it okey you think? (also I am going to code a plugin for chrome).
Nearly every document says 'android is not directly support webRTC'. So I need something to provide me webRTC on android. What it is? Is it native android that I have to code? Is it native (NDK) library that I have to include my project? Or is it a java lib? Or should I go for cordova/crosswalk or sth like that? I researched all but didn't find something can help me. Yeah there are documents about it but not enough..
Some of documents says, I need chromium. But why and how? They show me lots of linux terminal commands and even there is no a line java or C or C++ code. Even some terminal commands and links that they give is not working.
I read/found/tried these things as a result of my research:
Apache cordova
Crosswalk
http://www.webrtc.org/
https://github.com/webrtc
http://webrtc.github.io/samples/
http://simonguest.com/2013/08/06/bui...t-for-android/
http://orcaman.blogspot.com.tr/2014/...tc-source.html
https://github.com/pchab/ProjectRTC
https://github.com/pchab/AndroidRTC
and something more..
in a nutshell I need help. Please give me your hand. Thank you. (because I'm really very helpless and tried to do my best)
Thank you.
As others have suggested, I recommend checking out g.co/webrtc. As I understand it, your goal is to make Android connect to a web browser using WebRTC. There are two (three) ways you can achieve that.
You can just use Chrome, Opera or Firefox for Android. All these browsers support WebRTC, and it allows you to use the same code for your web app, as for your Android app. With the new Add to homescreen support, as well as support for push notifications from web apps on Android, this could be a very good solution for you.
You can use the Android native WebRTC library, available from WebRTC.org. As mentioned in my article, I recommend using the pristine.io compiled library, available from MavenCentral.
If you can limit your application to Lollipop, you can use WebView, which support WebRTC now iirc. I don't know much about it though.
And the best resource for getting help is discuss-webrtc. It's a lot more active than StackOverflow.

Image processing on Android Platform

I am new to android platform and have to do by B Tech project on this. I have to do product recognition and then process them. So, I need to do some serious coding on implementation of Image Processing on Android platform.
For this, I would require :-
Through understanding of Android programming
Setting up the environment for image processing on Android.
Finally, an emulator to debug my codes
So, I need suggestions for all of the above, like, what book I should go through for learning Android , what emulators I should use and can I use openCV libraries in my android application.
Regrading emulators, I have heard, that they are pretty slow and have lots of bugs. They keep on hanging. So, should I have an Android mobile then ?
Please comment, if, you are unclear about my question.
PS: I posted the same question here, but got no replies. So, posted it again.
Thanks !!
There are a lot of books out there, CommonsWare is a pretty good place to start for the basics, he has office hours (where you can ask questions) and comments on here quite a lot.
There is only one emulator as far as I know, most people use eclipse for their environment and it's fairly well integrated with the android tool set, but there are a few others, as well as command line tools if your prefer those everything you need for android development is here other than eclipse which is here
In regards to image processing I assume you mean image matching and yes there is an openCV for android there are also some commercial offerings if you don't want to try and sort through openCV
If you are going to be using a camera to do image matching then the emulator is not a great choice unless you want to be restricted to using it with a webcam (which is a pain to get working) you will still work a lot with the emulator though.

Is Titanium 1.8 finally free from the memory starvation issue from release 1.6 and 1.7

Hi there Im new to mobile application development. I had developed Android apps using Java and is just starting to get the hang of Cocoa Touch and Objective C. Now I am curious on mobile web application development to create cross platform/device applications which would at least run on Android and iOS(Apple devices: iphone, ipad). I tried Titanium and developing applications with this framework seems very promising. Although it is very powerful, popular, mature, documented and very easy to learn I had doubts investing time and to commit on using this framework for my projects after reading this blog which many Titanium users seems to agree with Why you should stay away from appcelerators titanium.
It seems that release v1.6 sdk and v1.7 sdk have the issue which they describe, the negative comments stopped right after the v1.8 sdk release was out.
My question is, is Titanium v1.8 sdk free from the memory starvation issue and other issues which were discussed on the blog post?
Would you personally recommend this for production use? And by the way I am using the 1.0.7.201112152014 Titanium build does this use the 1.8 sdk? Thanks in advance.
Take a close look at the progress of comments. It starts from people agreeing with him, and in the end everyone disagrees.
You can select the SDK you wish in the tiapp.xml editor, which is embedded in Titanium Studio. You should indeed use 1.8.x
The platform isn't, and probably never will be, memory issue free. But it also depends on how you build your app.
Stay away as much as you can from includes. And also stay away from creating a window/view/etc. with a file as url in it, this causes most memory issues because it's in a different space.
If you code well, you can use it perfectly without any issues.
Blog post author here. I don't fully agree with Topener - go ahead and read the comments yourself, it's just not true that "in the end everyone disagrees".
For what's worth: my experience is related to version 1.6.2. I've talked to people working with trunk and they told me that the memory issues are far from being resolved.
The only approach that seems to work is, as mentioned in the comments, the Tweetanium approach. But beware, that's not "if you code well". It's "if you code the way Titanium likes". If you take a look at Tweetanium (I suggest you to do it no matter what you decide to do in the end) you'll see that it has a very specific way to deal with architecture. If you follow that path, you should be good. If you think that the way Tweetanium is structured is good for you application, go for it. Be wary though, because (at least in what I consider to be complex) Tweetanium is not very complex, and with growing complexity I found that their approach is difficult to maintain. Again, evaluate for yourself.
Then there's the Android issue. Android support is far from optimal - Wunderlist decided to rewrite their Android version in native, I myself have had huge problems in making anything even remotely complex in iOS working decently on Android. If you need to support only iOS it's alright but, if that's the case, I don't see why you shouldn't write the app directly in Objective-C... considering also the (unavoidable) delay/mismatch between the Titanium and the iOS SDK.
Just my 2c. I suggest you not to take the decision lightly - it costed us a lot.

MoSync experiences

Does anybody have experiences from cross platform mobile app development framework MoSync?
It sounds very good and promises much. But does it deliver?
We have used MoSync for 8 months now and I have a good feeling about it. It is still magic to me that you code in C++ and out comes a jar-file or whatever platform you choose.
It is great for application development but I wouldn't recommend it for gaming with advanced graphics. It seems too slow for that on Symbian.
The APIs are very easy and I learned it very fast. And I have the freedom to do whatever components I want thanks to the MAUI framework and using widgets with skins. You can really make an application look very nice.
It is great for me as a developer that I can support so many phones and platforms. I can also do specific behavior and include/exclude functionality based on the phones capabilities.
When it comes to deployment I end up with hundreds of binaries for every device and I have to take care of them my self. To put them on a web server somewhere and make sure that every user get the correct binary when they try to download the app. I wished that they had some kind of app-store so they could host the apps.
MoSync still have a bit to go until it is working properly. There is no guaranty that an application that is build for a specific device actually works on that device. But I'm sure that they will reach there very soon. And when they do... I simply just need to rebuild my app with the SDK (I think).
Have you seen Mosync 2.6, I think this solves most of the problems you mentioned,
the feature list is at:
http://www.mosync.com/documentation/manualpages/whats-new-mosync-26-pyramid
I personally I'm quite excited about the whole HTML 5 integration, it sort of blurs the line between native and web app.
Hope this Helps
Tony

Categories

Resources