android

Can I do this entire layout with RelativeLayout?

Here's a screenshot of the layout I'm looking for: http://www.vimtips.org/media/ll.png Can this all be done with one RelativeLayout? ...

Picking images and videos on Android on 2.1 using ACTION_GET_CONTENT

I'm working on an app that needs to have the user select an image or video. On pre-2.1 devices, using ACTION_GET_CONTENT seems to work fine with multiple MIME types: new Intent(Intent.ACTION_GET_CONTENT).setType("video/*, image/*") However, on a Droid running 2.1, this gives a "There are no items in your collection". Using the same ...

Downloading mp3 files in java on Android

What is the best way to download an mp3 file in java (on Android sdk)? http://developer.android.com/reference/java/net/package-summary.html Should I be using sockets? If so - what kind of "Stream" reader should I use? I have also read something about "intents" - is this something that is applicable here? I am also curious as to what sh...

How to develop an Android application without having Android device?

Any software simulator that can help to develop Android app without actual phone? ...

Can't seem to load a webview from xml, why?

Well, I'm trying to follow the tutorial from http://rapidandroid.org/wiki/Graphing. But I found a problem just in the first part of it. I'll describe the problem here, I just cannot understand how this could be wrong, it's pretty simple stuff. What am I doing wrong here? First I created a xml file called statistics.xml, in it among oth...

Sprite array list never works! Need help understanding how to create arrays of class instances in JAVA

// Particle Stuct Instance private Sprite[] mParticles = new Sprite[10]; /// Particle emitter Properties private Context mContext; private int mPositionX, mPositionY, mWidth, mHeight, mNumParticles; private Rect srcRect, dstRect; /*** Constructor ! ***/ public ParticleEmitter(Context c, Sprite spriteImage, int num_particles) { ...

Why changing Color of Default Button makes it look RECTANGLE in Android ?

Why changing Color of Default Button makes it look RECTANGLE shape ? I do not want to use custom background images for this. I want to do this programmatically for few conditions on which I change the colors of many small buttons on screen. Can anyone give a solution ? P.S. ==> It seems there is no workaround by reading this http://gr...

Reg : Contact changes in Android

Hi, I am using ContentObserver on contacts. But here my problem is atleast once i have to launch my application other wise i am unable to get notification chages. My code like this ContactsContentObserver cco = new ContactsContentObserver(handler); ContentResolver contentResolver = getContentResolver(); contentResolver.regis...

how can i display number of images in android application with scroll view.I think the images should be kept in list view.pls help me

i want to display images on android screen.and the images should be scrolled in vertical way.how should i do the coding?pls help me ...

Android register to remote server on first application uses

Hi, I am writing a android application where I want to register my application to remoter server when application is first launched on installation. Application will register to remoter server itself without taking any user input. How Can I track whether this is a first application launch after installation ? ...

Android adding HTML content on a webview without space

I am trying to add an HTML content to a web view. If the words in the HTML content are without spaces then webview keeps that particular word on the same line.I want that content to be wrapped and be on the next line.Is it possible to do that.I am attaching a sample code that can reproduce the issue. String temp="<p>WebViewallowsyouto...

Creating tabs for calling activities

Hi , I have some activities in my project like, Alerts,HomePage , Calculator etc. What i want to accomplish is to create tabs for all these activities and insert images for these. When we touch the tab the corresponding activity must load. I have done it using the menu options. But i must accomplish this using tabs. The tabs must also b...

Error while opening the Eclipse Android Layout Editor

Since yesterday everytime I open my layout Editor in Eclipse for the Android UI I get the following exception: Unhandled event loop exception java.lang.StackOverflowError at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.isTheme(Unknown Source) at com.android.ide.eclipse.adt.i...

How to show incoming call notification in android application

I want to display one dialog box after incoming call, so that I can run my application in background while receiving call. How to catch that incoming call in android application??? ...

Building Android NDK Toolchain for x86 Android on Windows via Cygwin

The Android SDK includes the Android NDK, which in turn contains a customised GCC based tool chain for Android on ARM processors; The question is how to build the NDK tool chain to run on Windows to target x86 Android? The tool chain is already setup to build on Windows (cygwin) targeting ARM; There are also existing pre-built (unoffici...

Keeping screen on, which way?

Hi! I have found two ways on keeping the screen on: First one is simpler: getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); Second one is using a wakelock and requiring an extra permission: PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); ...

Android: TabActivity, Creating Menu

Hi, i have created 3 tabs using the TabActivity. The class declaration is like this. public class ABTM extends TabActivity { ........ some code .......... } now i want to create a Menu with three menu items. but the problem is that the **@Override public boolean OnCreateOptionsMenu(Menu menu){ }** gives error. It says that i sho...

Android Video View - Fails to Load file from SD Card

I have an activity that uses VideoView and MediaController. I have a .mp4 file. When I put the file in res/raw folder, I can play the video using Uri.parse("android.resource://&lt;package&gt;/" + R.raw.id_video) However, when I put the same file in the filesystem, it plays properly. I use videoView.setVideoPath("/sdcard/myfile.mp4"); ...

OnLowMemory getting called

Hi, I am doing an App which access the gprs .I am facing problem when the user starts another application who uses gprs also like google maps .It takes it own heap memory ,after doing some operation on Maps app it calls OnLowMemory of my service .and my ui is also killed in background. I am not getting any proper tutorial haw can i s...

Help with listView in Android

Hi, I'm just starting with Android and can't find how to display a list in my activity. The activity and the layout main.xml are shown below. How can I display the country array in the ListView 'list' of my layout? thank you Jul public class Atable extends ListActivity { public void onCreate(Bundle savedInstanceState) { ...