I'm fairly new to Android and have gone through the basic tutorials. I thought I'd dig a little deeper and downloaded the source code to some of the "native" Android apps, like IM, Email, Voice Dialer, etc.
In importing the source of these native apps into Eclipse, I found that they reference classes that are not in the 2.1 API, i.e. classes such as android.content.Entity, android.net.http.DomainNameChecker, etc. As a result, I can't compile and play with this code.
So is there is a "hidden" API that the native apps use that is not available to the regular app developers? Is there a "native" SDK I can use to import these classes?
David
As with all hidden API:s these are hidden for a reason and that is that they are used by the framework or specialized applications and are not guaranteed stable or suitable for general development. It is not advisable to use non-supported API:s for your applications since they might break on future releases etc. The ones that you mention are part of the framework and used internally by the Android system.
That said, if you just want to explore Android you may build your apps as part of the platform build system and test them with your own build from the open source projects.
The article "Using internal (com.android.internal) and hidden (#hide) APIs" by user inazaruk shows you step by step a method to import hidden Android APIs.
Related
I was reading the Marmalade UIBuilder Tutorial and it says to open the UIBuilder. I have seen no such program with my download. Where can I get the UIBuilder? Why was it not included in my download?
If you are using Marmalade 6.0, then please see the Documentation on the UIBuilder. It states that:
We have removed the UI Builder because we believe that, going forwards, it is better for the Marmalade UI runtimes to support a standard UI markup rather than our proprietary markup. In the 6.1 release, we plan to support a standard UI markup, meaning that developers can leverage multiple 3rd party tools (including free tools) that support that markup.
Our plan for the 6.0.1 release is to make the UI Builder source code publicly available, together with full instructions on how to build it. In the meantime, developers can still use the UI Builder tool by installing the most recent 5.2.x SDK version.
aka they have not included the UIBuilder so that more standard UIBuilders can be used. But they also say that you can download the old 5.2.x SDK version. Hope this helps!
hey guys, i am researching android app development, and i cant find much on building an app in C or C++, so my question is, is it possible to build an android app using only C or C++ ?
Yes, in the most recent versions of the NDK they've announced such a capability. Before that, you could have an app that's a thin layer of Java on top of a C/C++ NDK core.
The majority of the run-time library is still Java-based, and accessing it from C++ is not exactly straightforward. JNI exposes the Java world to C/C++ callers, but it does not look pretty.
You might consider one of the other cross-platform services (e.g. MoSync), but realize that they are also limited in the sense that they give you access to more generic language features. Advanced or new features, such as NFC are not yet supported. Further, if you are planning on deploying the app commercially, you may have to pay them a royalty. You can get a better amount of information at their site.
Sure, using the Android Native Developers Kit.
I have 6 months experience with Android, developing simple UI-based applications. Now I want to write applications targeting the Android core Kernel. For example, I want to develop a framework which is not present in Android. To achieve that, we have to write the code for the Kernel. I don't know where and how to start Android Kernel programming.
If anybody knows the way to start it please help me.
xda-developersA very awesome and very active place for anything smart smart phone related.
kernelnewbies
Generally good resource for starting out learning linux kernel(Which is what the android is built off of)
Building Android KernelAndroid Kernel Source
Linux kernel Online guide to driver development among many other related topics.
Update
For android source code you can check out one of the following...
or this question
or source.android.com
I personally dig this chrome plugin for browsing android source code.
If you are talking about platform level programming,i.e. framework extensions, native libraries and services there are a few places to start.
The first one is the new and updated official open source project page. The portions about contributing and porting provide some basic information on the platform architecture and what you need to work with the platform. The next step is to understand the build system for the platform and framework. There are some limited info available on the net if you google for it. The best way is probably to study some of the makefile templates available in the open source project in the build folder. For info on how to add your own modules using Android.mk files it is a good thing to study make files for existing projects such as the ones available in external in the open source projects.
Once you have gotten as far as the above. That is you know the basics of platform level development and how to build your own modules for the platform the next step is to study the framework extension example available in the open source project. Check out the vendor/sample/PlatformLibrary folder (edit, as of 2.2 the vendor stuff has moved to the device folder) in the open source project and read the readme file, study the code, build it and make sure you understand it. If you don't then JNI, shared libraries, the platform security model and the core framework are areas that could help you out.
I guess that since you are talking about kernel programming you are also looking for ways to hook up new hardware with the platform and expose that functionality using your framework extensions to the applications. Hardware is basically added as a standard Linux driver so getting it to work under Linux is a good first step. How to hook it into the Android framework after that depends on what type of hardware it is. You could either use a native process to control it (compare the camera service or radio daemon in the current platform) or just spawn a thread in the application that uses your framework extension. For hardware that does not require that much attention plugging it in using an Android HAL library could also be an option.
I hope that provides some initial pointers on where to look. The official mailing lists are otherwise the main source of info about platform level development. Especially Android porting and Android platform.
You should also check out http://pdk.android.com. I just found this site recently and it is extremely useful. I wish I knew about it sooner. I'm not sure how dedicated Google is to updating the site because as BMB mentioned the vendor stuff was moved to the device folder in 2.2 but there have been no changes to the PDK site to reflect that. Also, some of the links don't work but I was able to find all the pages by doing a site search in Google.
The best and very first place to start would be Google’s documentation on android
https://source.android.com/docs/core/architecture/kernel
Then kernel building
https://source.android.com/docs/setup/build/building-kernels
Xda isn’t so great for kernel creation but is good for kernel modification and backporting. Mostly what they do there is provide newer versions of android to older phones rom modification and changing the battery animation in the boot.img
Google also goes over the development of new things for an existing kernel.
It’s best to start at the begining,
Personally I started at xda and went backwards which took WAY longer and just complicated my setup process.
Can anyone share some details for developing new SDK add-on like the one Google map API? I do not find any details on how to build new SDK add-on?
Is that good approach to have SDK add-on for connecting to twitter, Facebook, YouTube applications? I mean the library would contain the methods to access the developer APIs supported by the social networking apps. I am looking out some ideas for developing new SDK add-on.
Let's assume I have added new service API in the android core framework. Now can I build a SDK add-on in order to access that service? (This add-on library would have simpler API calls that would in turn available the service from android core service)
1.) I have not tried this out much myself but there is a demo SDK-addon available in the platform distribution. Look in the vendor/samples folder of the Android Open Source Project. There is not much documentation on it. What is needed is that you create product make files for your SDK-addon and build your platform with this product description. It will generate the file system images needed to include with the SDK, documentation etc.
2.) I am not sure if SDK-addon is suited for connecting social services like you describe. Using a regular Java library and linking it directly with your application sounds like a better way unless your are building for a specific device. As I understand it the SDK-addon and framework extension mechanics are primarily for people who create their own devices and need to add device specific API:s to the SDK. One example would be the case where you are using Android to build a navigation system in a boat and want to include API:s where you can get information about speed, engine status, measured depth etc from some other hardware in the system. In that case you would build your system including the extra services and then generate an SDK addon for developers who would like to build applications specifically targeting your nautical use case.
3.) Yes, I believe you can. Remember however that SDK addons require system images that correspond to a device with the added capabilities and applications written using the SDK-addon will only work on devices that include this functionality.
This is my first S/O question, please be gentle!
I'd like to know more about porting C applications to native ARM for use on Android devices.
I can make simple programs using the prebuild toolchain which comes with the source, but how can I use this toolchain with applications which are more than one file and require configure and make?
This article explains it quite well:
http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/
Basically, you create a shared library like you normally do, wrap it with JNI and call it with native methods from Java.
At Google I/O they talked about introducing an "NDK" -- native development kit -- that should simplify the process of creating applications that use native (C) code.
It's worth noting a couple of things before you go too far down this route:
The NDK will provide limited functionality. It will be primarily intended to offer a way to run extremely time-sensitive code natively, but won't have access to the full system, nor will it provide an alternative application development model (you'll still need to write most of your app for Dalvik).
You can write native apps without the NDK, but you won't be able to distribute them to end-users using the conventional APK application package supported by the app store. It's really only a viable option if your app is being distributed as part of the carrier / OEM build - and even then isn't recommended.