android

mock location in android

I am using the following to mock my location in Android. public class GPSwork extends Activity implements LocationListener{ LocationManager locationManager; String mocLocationProvider; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ...

Android: How to reference a library project from an Eclipse ADT application project?

I have a project that is compiles but throws a NoClassDefFoundError on a classname included from a sibling library project, but only when built from Eclipse. When I build the project from the ant file, it runs just fine. How do I tell the Eclipse build system that my application's .apk needs a copy of the .class files from the library ...

Integers and Calculations

I'm working with integers and trying to do calculations that involve decimals at parts. I have used this same setup before and it had worked but for some reason this isn't working. package table.periodic; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android....

How can I change the CommonsWare cwac thumbnailAdapter to cache to the SD Card?

I am using Mark Murphy's ThumbnailAdapter in a project to cache and display images from the web in a list view. It works well, except that it caches to internal memory. I can't figure out how to modify it to cache to external memory. Any advice? cwac-thumbnail: http://github.com/commonsguy/cwac-thumbnail ...

Set Toast Appear Length

Is there anyway I can tell a Toast Notification to show up only for a specified amount of time. Generally shorter then a regular toast message. ...

How can I develop 2D bmp to 3D Ball

I develop a 2D to 3D android application. but It will not work Anyway I've used this library import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.opengl.GLSurfaceView; import an...

android listview with CheckedTextView

i have a listview using CheckedTextView as its items when user click one of those items , i want to change the backgroundColor of the item. i wrote this: mp3_listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View _view, int i...

GLib - main event loop in C++

Hello, I need to implement my own main event loop in C++ which will be based on GLib library. I don't know where to begin. I studied some materials about GLib, but it doesn't help me to know, how implement event loop. Could somebody give me some advise about it or give me some source code? I basically need to implement GSource and GSourc...

Android Porting on Telechips TCC89XX: Not able to start init process

Hello I have started to port Android on TCC89XX board, I download Android SDK. and applied the patch with kernel 2.6.29, the Processor is having armv6 instruction set. I am not able to see the network up ifconfig is not able to show the network devices. Also I do not get why there is no "on" binary in the system/bin, system/xbin, the...

What hardware is needed to run the Android emulator fast?

My home PC is an Intel E6300 with 4GB RAM. My company PC is an Intel i5 quadcore with 4GB RAM. I ran the latest Android emulator (came with SDK) on both PC's (both running Windows 7 x64), and it was unbearably slow on both PC's. On my home PC, I ran Windows Phone 7 emulator and it worked smoothly. I booted up with my Hackintosh on the s...

To use layout_marginLeft in a button style applied as a theme?

Hi, I used an attribute layout_marginLeft="30dip" in a style defined for buttons. When I apply this style individually for each button, the left margin is placed as I wanted. But then I defined another style inheritting from theme. In this style, I assigned my button style to the attribute android:buttonStyle and applied this as theme. ...

Why are some contacts censored from apps on android?

If you try the Contact Manager that comes with Android 2.2 Froyo it will give you access to all contacts in the sqlite database via Contact ContentProvider. But if you write an app that is not com.android.contacts you only get access to the restricted table because of this code here: http://www.google.com/codesearch/p?hl=en#cbQwy62oRI...

Decoding html returned as json response - android

I am getting following encoded html as a json response and has no idea how to decode it to normal html string, which is an achor tag by the way. x3ca hrefx3dx22http:\/\/wordnetweb.princeton.edu\/perl\/webwn?sx3dstrandx22x3ehttp:\/\/wordnetweb.princeton.edu\/perl\/webwn?sx3dstrandx3c\/ax3e I have tried java.net.UrlDecoder.decode withou...

Android set the gravity for a TextView programmatically

I can use android:gravity="bottom|center_horizontal" in xml on a textview to get my desired results but I need to do this programmatically. My textview is inside a tablerow if that matters in a relativelayout. I have tried: LayoutParams layoutParams = new TableRow.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gra...

Invisible / transparent button that works like a regular in android?

How do I get one area in the middle of a image clickable (not the whole image)? Tried with a button set to invisible and clickable but the button does not work. What are the alternatives to an invisible / transparent button that works like a regular? I've also thought of a completely transparent and clickable PNG that should work but ma...

Simple implementation of Android C2DM required

I am trying to implement Android c2dm. I have looked into documentation and seen the jump note and chrome to phone samples that are provided... But i couldnt really figure out the process. It would be great if i could simple implementation of c2dm where in when we send a request from server, it displays simple notification... Plz help ...

map becomes slow on android device while zoom in out and drag.

Respected All, I have use google map in my application. On that map i have added more near about 100 overlays() to show different locations. When i install my application on device the maps seem very unresponsive/slow. Is there some reason for that? If any one know cause of it, please help me. ...

why keyboard not launched from status bar edittext ??

Hi all, I implemented a edittext and a button on a status bar. The problem i face here is, when the edittext is focused and i click it, i couldnt see the Keyboard popup not happening. But if i focus it, cursor blinks, and when i type some characters it is handled by quick search box Activity(intent ).!!! I have implemented onCli...

android market account information tool

hallo, is their a way to get information of an android market account(my account) for other poeple ? So that other poeple have a look on how it is without permission to change something.. (e.g.that financier have a look on it). find nothing until now LG j ...

how to display a list in android

I have a String countries[]. now when i click a button then on the onClick event this abc array is filled.suppose it is filled with the name of 10 countries.These 10 countries should be visible as a list so that i can choose any 1 country among the list. but i am not able to show them as a list. My programme crashes if i use the follow...