android

android messagebox

I need to display a msgbox in the onFinish method of mu main activty. But I get the following exception : android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@43202998 is not valid; is your activity running? No, my activity is not running, I'm in the onFinish treatment, but I doesn't have ...

j2me touch gui looking like android

Hello i would like to remake a program i made for android in android it looks pretty nice and is very touch friendly now i need to make it for symbian what would be the best approach to achieve similar graphics and functionality i tried searching in j2me but the graphics look so very outdated :( here are some screens of the android i...

android Imageview layoutparams in dip ?

Hi, I'm using the following code : ImageView i = new ImageView(mContext); i.setImageResource(mImageIds[position]); i.setScaleType(ImageView.ScaleType.FIT_XY); //pixels settings !!! i.setLayoutParams(new Gallery.LayoutParams(200, 100)); but as you can see, it is setting the layout dimensions in pixels. Does...

Android Tabview Layout with Admob

I have an android XML and I am trying to get the ads to show up at the bottom of a tabview, but they are not showing up. I think I am just missing something very simple, but I have been looking at this for far too long and I hope someone can help me out. Here is the XML: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="ht...

Android: Detect another application has started playing audio

My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application. This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a...

How can i pass value from new activity to old activity in android

Hi Friends, i am using two Activity as Old Activity and New Activity,i want to pass some value from New Activity to Old Activity.how can i pass the value from New Activity to Old Activity please give some example code for that.... Thanks All ...

Add folder to package directory

I know I can do this in code, but seems like there would be a simple setting in the package configuration that would allow me to add a folder to /data/data/com.blah.blah/. I'm wanting my app path to have a "memos" folder auto-created when the apk is installed. Just wondering if there is a simple way i should be doing this in eclipse. ...

Database calls in services

I've been watching Virgil's presentation at the Google I/O on REST-heavy applications. Google I/O 2010 - Android REST client applications Though the notepad tutorial makes database calls directly from the UI layer, Virgil suggests making database calls in a Service. At the moment, my Activity's onCreate method uses an extended Content...

android google ads footer

hello, i want to integrate googles ads to my application. the one that you see at the bottom of the screen on most free apps. but i could not find any website related to that topic. is it related to google adsense? thanks for any links and guides on how to set it up in the layout! ...

Android: Detecting application backgrounding.

Hey all, I have an application that has many screens. Is it possible to detect if the screen NOT belonging to the application (not defined in my android manifest) comes into visibility? ...

Why is my string to string comparison failing?

Ok so I have an Android app where I want to check to see if an app name that is installed matches a string passed to the function containing this code. The code and example is below: private Boolean checkInstalledApp(String appName){ PackageManager pm = this.getPackageManager(); Intent mainIntent = new Intent(Intent.ACTION_MAIN...

Android: Help required in card matching game?

I have 20 cards of which there are 10 pair of images. The player is meant to find a match of each card/image. The problem is that if a player taps or clicks each card twice then that card gets decremented from the remaining ones . I need to disable the click listener of the ImageView. How can do that? ivOne = (ImageView)findViewById(R....

Is it possible to change the radio button icon in an android radio button group

I am wanting to allow the user of my android application the ability to set some parameters. The radio button is ideal for this situation. However, I don't like the radio buttons are rendered. Is it possible to change the radio button icon? For example, is it possible to create a custom layout for each row and in that layout refere...

Andriod USB communication

I need my app to connect to a PC via USB cable and continuously send/receive data. I wanna use ObjectInputStream/OutputStream for this. Is TCP the only way? Is the only way to have ADB installed and use ADB forward for this? Can't I transfer data without the user to have ADB installed? Thanks. ...

Android Map Zoom to Show all Pins

I have 5 pins added to a map. How can I tell the MapView to zoom as much as possible and keep all pins in view? ---I found it: http://sdhillon.com/find-the-center-and-span-of-a-set-of-points-android-and-iphone-example/ ...

how to get first and last position of textview from horizontal scroll view

friend's I have a horizontal scrollview with text fields,here i need to get the first and last position of textview when i scrolled it,how can i get the position of textview when i scrolled.and also need to know how to set color for text when i clicked the particular text from this. sample code.... <HorizontalScrollView android:id="@+...

Android MapView Controls for changing to Satellite view

How do I add the built-in buttons for switching between Satellite and and Traffic view. I can add my own buttons and call the setSatellite(boolean), setTraffic(boolean) methods, but I was hoping there are built in buttons to do that like the Zoom buttons. ...

Admob ad never displays in View

I am trying to get AdMob ads to display in my android application and have been unable to do so. I have contacted their support and have not received any response in almost a week, so I figured I would now ask for help here. First some code: AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" ...

Is it possible to block outgoing SMS on an Android phone?

Is there a way to listen for outgoing SMS messages in Android? If so, is it possible to prevent the message from being sent? ...

Large amount of unit tests cause freezes with Failed Binder Transaction

Hello, I have about 400 unit tests that I have written for my Android application. If I run the tests package by package, everything works fine and all my tests pass. However, if I try to run them all at once, eventually (about 360 tests in), Android starts spitting out !!! Failed Binder Transaction Errors !!!. After about 10-20 of thes...