Skip to content
Advertisement

Tag: android

How to crash an Android app programmatically?

I want to test out crash report using acra but the first step is I need to simulate a fatal crash in Android using code. Any idea? Answer Just execute this code: divide by zero Update: Also can try this Create a method, And call this somewhere/buttonClick OR simply throw an uncaught exception Bingo!

Is there a need to use super.onActivityResult() in onActivityResult()?

Which one is better and why? This one: or this: Answer The first one is better. It’s more consistent with other event functions in the Activity API, it costs you nothing (the code you’re calling does nothing at the moment), and it means you don’t need to remember to add the call in the future when the behaviour of the

Android: javac vs Dalvik

My understanding is that Google didn’t like Oracle’s licensing policy for using the JRE in Java ME so it just rewrote it using its own JVM specification that mimics the JRE but behaves a little bit differently, especially when it comes to making things more efficient and more secure. So, if my understanding is correct, it means that when javac

Regarding the checked state of a Radio button

I currently have a layout where if the user presses the option 1 button a new layout is set where the radio button to its right is checked. Then the “Checker” button gets a new onClick value. How can I change this within the java code so that the option1clicked method sets the first radio buttons checked value to “true”.

Advertisement