How to look at code of some Android class? - android

I'm developing some Android application, and I need to look at source code of some Android class. I have tried to use Android Source tool (installed as Eclipse extension), but I can't still use "Open Declaration" for Android class, therefore I need to use alternative ways . Please, suggest me, can I open code for some class on-line or download sources? Thank you in advance.

Here is the link, which provides the class code with respect to their versions :
http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/

Related

How to implement herumi/mcl library into my Android project?

I would like to use herumi/mcl library in my Android project. I posted a question on Author's forum and he replied with these two solutions:
1. https://github.com/herumi/bls-eth-go-binary/ provides a static library for Android, which contains mcl functions. You can use them through gomobile .
2. https://github.com/herumi/mcl/tree/master/ffi/java provides JNI of mcl. If you can build libmcljava.so for Android by cross-compile, then you can use mcl such as https://github.com/herumi/mcl/blob/master/ffi/java/MclTest.java.
I think that great solution for me is the second Option, but i absolutely dont know how. I am using Android NDK to call C code to my app, but thats all i know.
I am looking for some fresh tutorial or something like step-by-step, what would help me to use this library in my Android project. I am working on Windows OS.

Can we use native code as plugin in Rhomobile?

I need to run a java code for Android inside Rhomobile app. Is there any way i can call the java code. I have seen some of the plugins to interact with native codes for Android.
I tried searching and i did get to this url http://docs.rhomobile.com/rhoconnect/plugin-intro.
But i guess this is not for Rhomobile if i'm not wrong.
I have a library file for my requirement. Is there any way i can use it ?
Yes you can. Have a look at this http://docs.rhomobile.com/rhodes/extensions#native-extensions
The link you get is for RhoConnect ( basically meant for sync operation). You need to look into the native extension for Android : Rewriting the Generated Native Extension Source Code for Android
If you need some more help and support, you can go over
https://developer.motorolasolutions.com/‎
https://groups.google.com/forum/#!forum/rhomobile
You can also simply post you query here and tag Rhomobile & Rhodes.
Hope this might help you.

How to see inbulit classes

I am using android in eclipse . I wanted to see inbuilt classes in android such as 'BaseAdapter' class. Please suggest a method for seeing the content of those classes.
you can download the android source code and link it in eclipse. or the easier way is to use http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android/

What is recommended way to include android source code in addition to android SDK?

I am a new developer for android programming. I understand android SDK does not contain all classes from android source code. For example, AtCommandResult.class is missing (hiding) from android.bluetooth package in the SDK.
Sometimes, however, I want to use the hidden code in my app and I wonder what would be the best way to do that. One approach I can think of would be to include its corresponding source code in my project with different package name to avoid conflict with existing core. But problem with this approach would be I have to maintain the code by myself from that point. One or two classes are OK but you know where I am going.
Is there any better way other than bothering google to include the code in the SDK? Thanks in advance.
You may want to use a .AIDL file:
http://developer.android.com/guide/developing/tools/aidl.html
Those can already be used to access for example in Telephony functions.
Code example here:
http://code.google.com/p/auto-answer/source/browse/trunk/src/com/android/internal/telephony/ITelephony.aidl?r=13

Finding class source in android project (LinkedBlockingDeque)

I'm looking for a class source added to the Android sdk in version 9. The class is LinkedBlockingDeque.
How do you go about finding the source for a particular class?
You can use Java 1.6 implementation.
Download it from here
Then change
implements BlockingDeque<E>
to
implements BlockingQueue<E>
To make it compile on Android. BlockingDeque is sub interface of BlockingQueue, so no harm done.
i don't think any of the above would help:
first, some of the licenses mentioned are not totally open source - surely he would prefer apache license.
second , about the android classes , i can't find this class there. it would probably be much better to get the code from there .
i think that for now , the best thing would be to implement it by yourself . even the naive solution of having a single lock could be enough , depending on your needs.

Categories

Resources