Opening android AOSP native applications in eclipse - android

I need to edit the original Android Apps from packages
in terms make my own distro/mod..
I want to make changes to the In Call screen, lock screen, contacts, calendar etc..
I understand that for doing this I will have to build everything from
source,
however I need to edit the source and to do so I need to open the OS provided apps as
eclipse projects,
When I did I saw that there are
missing imports which are hidden in the SDK (or missing)
hidden parameters within the classes..
I don't want to use reflection since the whole code is here and
available, but how do you build a platform development kit..
or PDK ?:)
Can any one help?

You start by reading the documentation.
EDIT:
If you are trying to download some single project from AOSP and compile it using the SDK, odds are very strong that it will not work, and that you will encounter problems like the ones you cite. You do not build Android by building individual apps; you build Android ("my own distro/mod") by building the entire firmware. Most AOSP applications are not designed to be compiled by the SDK, but need the whole firmware.

Please check Using eclipse to browse and edit AOSP. You can atleast edit your code using eclipse, but you will have to use AOSP build system to build your distro.
You might also check Debugging Android Java Framework services as that would help debug your changes.

Just open Eclipse,
then go to "window" +"preferences" +"android"
there you will get sdk location,then give the appropriate path of the android sdk for proper run...

Related

Why do I get Android errors on Qt projects loading?

I do not use any Android features of Qt, my only purpose is to program some little softwares for Windows with minGW and QMake, no other project configurations is relevant for my needs. I'm simply curious if I missed a part, it does not affect the fonctionnality.
Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable
to point to your Android NDK
And a bunch of other errors like that. Its my 4th clean install of 4 different version of Qt bundle, (now I carefully unselect everything except minGW32 and it still showing up!) God's sake why?
Did I missed a part on How to use Qt? Do I need extra-steps to remove it manually on a project creation?
If you want to code for Windows: just setting up your project with default setting (without Android/IOS setting).
If you want to code for Android: The problem was that the file wasn't the correct NDK file. Make sure you get the correct NDK from the website. Other than that it is pretty easy just unzip it and that directory is the root directory.
So if I understand, I can't remove "Android options" from Qt as it is pre-installed for all platforms.
Then yes, even if I don't use it, I must install Android NDK. Then continue to unselect the kit. Then these Error messages will disapear.

Running a go program on Android?

I have a go library that i want to run on android and use its methods in my android app. I could write the whole android app in go to make it easier to use this dependency. Is this possible? If so, how?
Download Termux (Linux Emulator) from google play store and open it.
Next, wait for it to perform an automatic download of its resources. After that operation, the run the following command:
pkg install golang
pkg install git
The got package is required when downloading golang packages.
Eventually, you can test it by running (go) command.
Golang support for mobile development has been steadily improving. Today it is even possible to build some simple all Go apps (depending on which features you need) as well as Go libraries. Please see https://github.com/golang/go/wiki/Mobile for more info.
UPDATE: In further improvement, libraries are being created to support even UI on mobile platforms. https://fyne.io provides rather robust set of features for mobile.
You can use a Go library from Java when developing for Android with gobind (see this example in the gomobile repository). The biggest issue with this is integration into the build system.
For Go 1.5 things are getting better, but you'll have to wait for that.

Android build environment

I have been working with standard android for some time. Recently I have been building android sdk for windows and find some interesting things in Android build env. There is a command called lunch which can be used to list all available targets to build. However, it does not list sdk and its variants,even though they are valid options.
Does anyone know why is that the case?
Also can I build any specific module in Android sdk without building the whole sdk. (It could be a great help as I dont wanna build the whole sdk, if I gonna do a small change in one component.)
Thanks
Under the hood, lunch uses make, so if some pieces of SDK do not change, they won't be rebuilt.
My speculation about your first question: rebuilding SDK was never considered a major task of lunch. It is most often used to port or mod the system and produce an installable system image, and receive the ADK as by-product. Later, people realized that often (with root access to the device) you can iterate over one component without need to reinstall the whole system image.

Use Sublime Text 2 to develop Phonegap applications for Android

I've been using eclipse to develop Android apps with phonegap until, a few weeks ago, I decided to try Sublime Text 2. I found it to be so much better than the eclipse editor so I would like to keep using it. Only thing I'm missing is a quick way to test the app on the device inside Sublime.
Luckily, someone else also had the same idea and developed a plugin for this:
https://github.com/Korcholis/Andrew
Sadly, I cannot get it to work, I installed ant and pointed the plugin to adb but then nothing happens when I try to create a new project (and there is no error message in the console).
I also found this other plugin:
https://bitbucket.org/ucomesdag/sublime-android
But I have no idea on how to install and run it.
Did someone else found a way to do this?
A quick update into 2014.
As of PhoneGap Cordova 3.0, it is no longer required to develop Android apps via eclipse. You are free to use any code editor or IDE you wish as app building is done independently from eclipse via a simple command line.
cordova run android to package the .apk and install on any active devices detected by adb or
cordova build android to package the .apk only.
In your case, you can keep using Sublime and pop in the cordova run android command whenever you ready to go on a test run.
While I agree with Insane Coder that you should stick with supported IDEs to develop for Android, according to this link and existing Sublime Text 2 Ant support, you could build and develop your android project with this IDE (It will just take some time to set it all up... as opposed to using a supported IDE like IntelliJ or Eclipse).
Using PackageControl, look for "Ant". That will install syntax highlighting for Ant. Another plugin that enables the build command (ctrl+b) to work for Ant files, "Super Ant". You should be able to code for android in sublime text 2 with those installed.
On another note... Do you use windows? The Andrew project you link to, seems to have Windows compatibility issues. Apparently related to locating the "SDK" (he says sdk in Andrew's github page but, probably he means JDK?) in your hard drive. Which is probably a hassle because Windows typically installs stuff to "Program Files" and in code, that turns into "Progra~1" because of the space. In the link I give you there is another approach to it, so when you install the JDK set a folder that has no spaces in its name, like c:\java\jdk1.6.0_02 or something else that strikes your fancy. The problem you could be having with Andrew is that it isn't finding the jdk in your hard disk.

Making changes to a built-in Android apps

I've pulled and compiled the latest Android tree. Now I want to make changes to the Android's Browser application.
The environment in Eclipse is already set up. I tried creating the project by selecting "Build project from existing source", but it fails to build because it uses libraries not in the SDK.
Does anyone know how to import the missing source in order to build the Browser app, or even better, how to just copy the source into a separate project and use it like I was developing a regular application?
Does anyone know how to import the missing source in order to build the Browser app
That is not possible. The "missing source" is the operating system.
how to just copy the source into a separate project and use it like I was developing a regular application?
That too is not possible.
You cannot just grab an app out of the Android open source project and build it via the SDK. Some of the apps were first written before the SDK existed. Other apps rely upon APIs that, for various reasons, have not yet been exposed in the SDK.
You are welcome to make modifications to the Browser app. However, to build them, you need to use the build process for the firmware, not treat it as a regular SDK-based project.

Categories

Resources