dalvik

What can you not do on the Dalvik VM (Android's VM) that you can in Sun VM?

I know that you can run almost all Java in Dalvik's VM that you can in Java's VM but the limitations are not very clear. Has anyone run into any major stumbling blocks? Any major libraries having trouble? Any languages that compile to Java bytecode (Scala, Jython etc...) not work as expected? ...

JRE on Android

This might sound like a stupid question, but google didn't help me. Is there a JRE available for Android? If so which version is it? Are there any major features missing? If not does that mean all java apps need to be recompiled for Dalvik to work on the Android? Update; Will there ever be JRE available for the Android? ...

Google Android - how to figure out if 3g and 2g is turned on.

I'm developing a simple application for the Google Android to turn on and off the wifi or 3g or 2g. I see http://developer.android.com/reference/android/net/wifi/WifiManager.html#isWifiEnabled() that you can see if the wifi is enabled or disabled and also us http://developer.android.com/reference/android/net/wifi/WifiManager.html#setWif...

How Do I Execute Dalvik Op-Codes

I would like to execute opcodes directly against the running Dalvik VM instance from within my application on Android. I'm looking for something similar to the C asm function. I have a list of opcodes for dalvik, but I am unfamiliar with how to either execute them directly, or write them out to .class files and execute them against som...

How would you improve Dalvik? Android's Virtual Machine

Hi All, I am currently writing a paper on the Android platform. After some research, it's clear that Dalvik has room for improvement. I was wondering, what do you think would be the best use of a developer's time with this goal? JIT compilation seems like the big one, but then i've also heard this would be of limited use on such a low...

How do I make isolated dalvik

I am tracing the Dalvik machine source code. According that, I want to make Dalvik runnable. I have seem the dvk project. But there has many problem result in fault. Are there have any way to make dalvik only without all android. Because make android will take too much time (about many hour) thx for helping dvk project: http://code.goo...

Common performance pitfalls on Android?

What are the most easy mistakes to make that can be performance sinks on Android? The documentation mentions "some floating point operations" can be "on the order of milliseconds" - has someone tested this? For the sake of discussion, let's assume its running on a G1/similar device. ...

Show Complex Toast From BroadcastReceiver

Hi, I wonder if someone can help me. I'm trying to display a toast element when an SMS is received. This toast should contain a layout which has an image (SMS Icon) and 2 textviews (sender, message) If I call the following method from an activity, it works as expected... public void showToast(Context context, String name, String messa...

android storing key , decompiling fear

Im using amazing FPS and i have to store the secret key in the java code. However I am afraid that someone would decompile my apk and find the key. I have decompiled the apk myself and could not find the key, but im no VM expert. Any help? ...

Which programming languages can I use on Android Dalvik?

In theory, Dalvik executes any virtual machine byte code, created for example with the compilers of AspectJ ColdFusion Clojure Groovy JavaFX Script JRuby Jython Rhino Scala Are there already working versions of bytecode compilers for Dalvik available for other languages than Java? ...

Is android getting a jit compiler soon?

I've read that there is a jit compiler module for dalvik vm on the works and the results are quite promising. Some people claim an improvement of 100% in terms of execution speed. Does anyone have an idea when it is going to be incorporated in an android release? The amount of RAM on the nexus one (512MB) hints that a jit may be introduc...

Impact of 'instanceof' in Android Java code

Does the 'instanceof' keyword bear with it a relatively heavier impact on the Android platform (and more speciffically the mobile phones running the Dalvik VM)? Thank you. ...

Can't generate apk because of trouble processing "java/awt/font/NumericShaper.class"

I can't compile my Android project for the Dalvik VM because of this error: trouble processing "java/awt/font/NumericShaper.class":Attempt to include a core VM class in something other than a core library. It is likely that you have attempted to include the core library from a desktop virtual machine into an application, which will mo...

Automated testing in Android development

I have an ordinary project with JUnit tests that are connected to the classes in my Android Project. I want my server to run some JUnit tests in my testproject everytime I commit my code from my Android Project. Is there a best practise to do this? So far I only managed to run the tests when they are a part of a while the JUnit tests a...

Class initialization issues loading java.util.logging.LogManager in Android Dalvik VM

I've done changes in an Android native library and installed a new system.img file but am now getting an unrelated Error on startup. I can get past it by swallowing the error but I wanted to know if anyone can explain what the issue is. The Android implementation of Logger.java claims that it is Forcing the LogManager to be initialized ...

Are primitive types garbage collected in Android?

I know this may be a dumb question, but my background is more in c++ and managing my own memory. I am currently cutting down every single allocation that I can from one of my games to try and reduce the frequency of garbage collection and perceived "lag", so for every variable that I create that is an Object (String and Rect for example...

Why are there so many floats in the Android API?

The default floating point type in Java is the double. If you hard code a constant like 2.5 into your program, Java makes it a double automatically. When you do an operation on floats or ints that could potentially benefit from more precision, the type is 'promoted' to a double. But in the Android API, everything seems to be a float f...

Using static variables in Android

Hi, In android, are using static variables a recommended practice? E.g, implementing a Singleton pattern in Java, I usually do: private static A the_instance; public static A getInstance() { if (the_instance == null) { the_instance = new A(); } return the_instance; } Also, when does this get cleaned up by the Andro...

Chaning coding style due to Android GC performance, how far is too far?

I keep hearing that Android applications should try to limit the number of objects created in order to reduce the workload on the garbage collector. It makes sense that you may not want to created massive numbers of objects to track on a limited memory footprint, for example on a traditional server application created 100,000 objects wi...

Dynamically Generating Dalvik Bytecode into a running Dalvik/Android application

Hi all; This question has been asked(and answered) many times about dynamically generating and loading java bytecodes at runtime into a running Dalvik VM, but is there any way to load dex files/bytecodes into an app at runtime? Thanks ...