On Launch of the application, I want to detect if the device running is rooted.
Is there proper way of detecting it?
I don't think trying to write a file to '\data' to see if rooted is a good solution.
(Since even rooted devices may have that path unprivileged)
...
I would like to ask what is the good practice on using anonymous classes vs. named inner classes?
I am writing an Android application, which includes many UI elements (buttons, text fields, etc). For many of them I need some kind of listeners, so in onCreate of the application I have bunch of quite small anonymous classes like:
someBu...
Has anyone tried to use a newer version of Apache HttpClient on Android? There's an annoying bug in the HttpClient used by Android and I was wondering if I would run into problems trying to redistribute HttpClient 4.1 with my app.
...
I would expect (based on intuition, and the implementation of AffineTransform in Java):
a.postConcat(b) -> a = a x b
a.preConcat(b) -> a = b x a
but according to the android documentation:
public boolean preConcat (Matrix other)
Preconcats the matrix with the specified matrix. M' = M x other
public boolean postConcat (M...
I am playing with the Android TTS engine. I am trying to set it to speak in Spanish from Mexico, rather than from Spain.
I have tried several combination's of language code / country code but I have not been able to get anything by Spanish from Spain. Here is my code currently
loc = new Locale("es", "MEX");
myTts.setLanguage(loc);
say(...
how to get font from the previous activity on current activity on canvas
...
Things had been going swimmingly, but as of last night, when I hit a breakpoint in my own code (not Android code--I've found plenty of people looking for answers to that question, and I get why that's not available), I'm presented with "Source Not Found". I can try "Edit Source Lookup Path ..." all I want but to no avail.
What might hav...
I don't understand why I'm getting this exception when hitting the back button. I have the IntentReceiver registered in the onCreate method and it is supposed to be unregistered in the onPause method. My Log.w() call inside of the onPause method leads me to believe that the unregisterReceiver() method is being called, but I am getting th...
I need to add a header to the top of the expanded children in an ExpandableListView. The same header should appear at the top of all expanded children. I've been trying to do it from the adapter like this:
public int getChildrenCount(int groupPosition) {
//Add one extra to children size
return mGroups.get(groupPosition).size()+1;
}
...
I'm drawing a ProgressBar in a custom View (SurfaceView) to it's Canvas, and it's drawn as expected. Except that it's not animating, no matter what I do.
My custom view is animated properly, but I cant change the progress of the ProgressBar.
I've created the ProgressBar like this:
mImageProgressbar = new ProgressBar(context);
mImagePro...
How to post message to Facebook using HTTP in Android? Maybe there are more simple ways?
...
I've created a home screen widget by extending the AppWidgetProvider. It works fine on all phones tested so far except Motorola's Droid 2 from Verizon. It's running Android 2.2. What I noticed is when my widget is first place onto a homescreen it works for about +/- 15 seconds. Then I see the widget receives the action com.motorola.blur....
I may be assigned an Android project, and have minimal experience with Java but a lot of experience with Flash Builder. Does anyone have an opinion on Adobe AIR for Android, which lets you "publish ActionScript projects to run as native applications for the Android OS"? I'm generally wary of cross-compilers, but don't have a desire to ...
I would like to create a UI where half of the screen is a ListView and the bottom half is another view. Not sure how to specify the maximum height for the ListView.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="...
We have customers asking for apps that can run on both iPhone and Android. I realize this will mean two different development projects, but wonder if anyone has any advice/creative tips on this subject? e.g. Ways to maximize shared resources?
NOTE: Realize making the app web-based would be most effective way, but looking for advice on...
I am trying to get a GeoPoint for -23.4456 by 45.44334
What values do I pass into the constructor of the GeoPoint as it take Ints only.
...
Hi,
I need to validate a self-signed certificate when connecting to a .NET web service using HttpClient. Can anyone redirect me to any resources ?
Thanks,
Teja.
Edit: From what I've learned after posting, the following src code from http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/httpclient/src/examples/org/a...
I am drawing several lines on a canvas using drawline, the lines are semi transparent (their paint has an alpha value <255) only problem is that the point at which they cross creates a dot of less transparent color (obviously) is there a simple way to avoid this?
...
Hi Friends,
i want to clear variable value when will i close activity
Thanks All
...
if I create a new arraylist of size 5...
Player P;
ArrayList<Player> orderedPlayers = new ArrayList<Player>(5);
and then I try to add to the middle of that arraylist...
orderedPlayers.add(2, P);
I get an indexoutofbounds... I also get indexoutofbounds if I use set instead of add...
orderedPlayers.set(2, P);
in fa...