I am new to Android system source code. My issue is that while debugging using Android Studio, the control goes to the wrong location in the source file while I step into it, i.e., it goes elsewhere in the source file, not to the method it should have stepped into. I know this issue sounds really silly, but has anyone else encountered it?
Also do you have any recommendations on how I would go about learning how the control flows within the Android system? I could not find many blogs on this topic (nor many questions and answers on StackOverflow about this either), and the Android documentation is not really helpful. I did download and build AOSP, but not sure where to go from there. Any pointers would be helpful!
Thank you in advance.
Debugging android framework libraries or native applications like surfaceflinger is tricky. The documentation on android site leaves lot of details to imagination.
Please start with Debugging Android Framework applications link to understand how to organize your source code, eclipse setup etc. The other articles on that site go into debugging of native applications as well as native libs loaded by Java applications. I suggest start there to save yourself lot of time.
For Android open source project you can see this link https://source.android.com/source/downloading.html
For Access online source you can see this link http://androidxref.com/ it is very good for explore ASOP.
I am Embedded android developer . you can ask me any question related to ASOP on stackoverflow.
Related
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.
I need to customize the android source code to add another secondary display for the device (this is the requirement). Hence i need to integrate the secondary display's drivers into the android stack and also add some libraries to the android stack using which the secondary display can be controlled. The driver code is readily available, so i only need to integrate it with the android stack. As i have never worked with android source code i hardly have any idea about how to proceed. Also there is no tutorial available for any kind of guidance for the same.
So far with the help of this site I'm able to setup the environment using the instructions given here: http://source.android.com/source/downloading.html
I should perform the integration on jelly Bean, so have downloaded JB source code.
Now proceeding towards integration of the drivers i have no idea how to proceed. Please provide some tutorials or useful links to do so.
Thanks in advance.
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.
I am considering PhoneGap for my first android project because I have had plenty of experience with HTML5 before. But before I start going deeper into phonegap, i want to make sure if phonegap provides all the features that I need for the project..
My app should be able to change the ringtone settings (volume and vibration settings) of the device. So, I wanted to know if this is possible using PhoneGap.
I looked into PhoneGap's documentation and couldnt find anything. I even tried asking this question in their google group but i thought asking the question here in stack overflow would be much faster.
And if it is not possible using PhoneGap... are there any workarounds??
Sincerely,
Aayush Shrestha
You'll need to write your own plugin for this - Cordova does not do this out the box, because it's quite platform specific.
Take a look at the following link to find out how to natively alter the ringtone: Setting Ringtone in Android.
You will then need to convert that to a plugin (which should not be too difficult - there are plenty of examples at: http://plugins.cordova.io/ which you can download and inspect).
Hope that helps!
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.