android

Can't send P2P message from real IP

Hello, I need to send messages to Android phones through P2P on 3G connection. Sending and receiving works perfectly on lan ip addresses(on wi-fi) but not on 3g or 2g. On 3g I send a message but it never appears on the other end of the line. Can anyone tell me how to make a connection ? What port to use ? Thanks, DataSmith ...

How can I profile my Android app?

I need to find where the bottlenecks are in my Android app. What profiling tools or techniques can I use? ...

Animating a background image.

I have a RelativeLayout with a tiled background. Is there a way to make a tween animation to fade out the existing image and fade in a new one? ...

How can i loop thorugth a HashTable keys in android?

Hello, i have a hashtable filled with data, but i dont know the keys How can i loop thorugth a HashTable keys in android? Im trying this, but it doesnt work Hashtable output=new Hashtable(); output.put("pos1","1"); output.put("pos2","2"); output.put("pos3","3"); ArrayList mykeys=(ArrayList)output.keys(); for (int i=0;i< mykeys.size();i...

Expand Android View as a full screen

I have a linear layout which has 5 text views. Suppose user click on 3rd text view. I want to expand this 3rd text view on the entire screen i.e. i want to show this 3rd text view as a full screen in the same activity above the other text views. Is it possible in Android ? ...

Download file using RESTlet API in Android

Hello, It will be great if anyone can help me to understand how to use RESTlet API in Android to download any file like image and store it in internal memory. Thank you ...

android timer question

Hello I am building an application that is going to execute a block of code at fixed periods of time (e.g. every 30 minutes). I would like that period to be strict,what I mean is that I would like to be guaranteed that the period will be 30 minutes and not 28 minutes or whenever the os whants to execute it. I have a Timer object and use...

how to show progress dialog onitemclick, android

Hi I have created an Activityname as ZBC. Where i have created Customized List view I am able to detect on click event using onItemClick() method of OnItemClickListener on list view. I want progress dialog to be displayed on click on ListView. I used the following code but I didnot get ProgressDialog How to display progress dialog in on...

configure an android application

Guys, I need an android application that can be configured by the user. In java, we are using properties file to configure the applications. Any idea about the same in android.. Thanks in advance ...

how to convert binary data (ISO-8859-1) to string

I have created an android app. It sends a data message on a port for communicating with the same app on some other phone. While sending the message, i have encoded it into binary data using ISO8859_1 encoding. byte[] b1=payload.getbytes(); I am able to receive the data message at the receiving end. But the problem is that after recevi...

[Android] What's the best practice to pass data between Activities? Should I favor Parceable over Serializable as Intent Extra?

I'm developing an app which basically navigates through a xml-feed. When I parse the feed or let's say the list, then each (list)item becomes a model. All the models are wrapped up in an array list. Now, when the user clicks on a list item, the underlying model is going to be serialized and sent as IntentExtra to the next Activity (e.g...

need help on supporting multiple screens in android

friend'd I need to display image has background and transparent text at particular location of the image text,here my problem is it display well in some devices and not being proper alignment in larger screens,even i used seperate resource file like layout,layout-large,layout-small but in some case it's not working well,i set an...

Android. How to change Activity within a Tab

Following situation: I have TabActivity with e.g. three tabs, TabA, TabB, TabC. There are a button in activity (Act_C_1) of TabC. So if the user clicks on that button, another activity (Act_C_2) should occur in TabC. I thank you in advance for any suggestions / or ideas. Mur UPD: Here is my code TabActivity with three Activities: ...

How to properly change Tab Background in Android

Hi Guys, I am a newbie to Android Development, and facing this particular problem while changing TabBackground Image. As you can see in the attached Image, there is a thin gray line. And I am unable to figure out where is it coming from. Can you please assist me in removing it. I have checked there is no padding anywhere, and android...

How do I keep Wifi from disconnecting when phone is asleep?

I have a service which polls a server at certain intervals. I use an AlarmManager and a BroadcastReceiver to start the service. My problem is that after a certain duration, even though the Wifi is still enabled, but for some reason, my application can't contact the server. I get an "Unreachable network" error. Note that I've already a...

android text file resource problem

Hi , I have a problem with txt files in my raw folder (android project) Explanation: I am added a some txt files to a folder raw/eng and I need to get that files (read) in class I made some if branches and happens that some files I can reference but some not "R.raw.ejapan" cannot be resolved ??? This is screen shot of ...

Android Launch an application from another application

Hi, I want to launch an installed package from my Android application. I assume that it is possible using intents, but I didn't find a way of doing it. Does anyone have a link, where to find the information? Thanks ...

Android Widget Size

Hi,.. Can anyone tell me how to make a flexible AppWidgets in android according to the screen size. I want to make a full screen widget, but when it change screen size, i want to make it flexible. Thanks. ...

Showing ImageView and TextView in Gallery

How to show TextView and ImageView both in a single Gallery View . I want to show Image title for each image just below it. ...

Twitter-Like background animated drawable in android

Just like Twitter for android used to have (they removed it) - I need to display an animated background drawable. How to I show an image that is actually bigger then the given layout dimensions (without the image being shrink). What kind of animation do I need to use for the "moving" effect? thanks. ...