android

Adding markers to a Google map on Android.

Hey Guys, I've got a place I want to add on my map at a particular lat / lng. I'd like to display that on my map when the activity starts. How would I do this? Thanks. ...

Android: Example for using a cookie from HttpPost for HttpGet.

Hi All, I am able to use the example here: http://www.androidsnippets.org/snippets/36/index.html and successfully get the "HTTP/1.1 OK" response for a webesite I am sending the HttpPost along with the user credentials. However, I am unable to use an HttpGet to further browse other pages on this site. Can anyone please let me know, wh...

How to read passive RFID cards using Android?

Hi All, I am working on Android application (Droid Incredible). I am planning to read passive RFID tags using Android phone but I found that there is no slot for Android to connect to RFID reader. After some research, I found out that I will have to get RFID reader which can send RF data over bluetooth to Android. But I am not sure w...

Is there a way to retrieve the user's phone number in an mobile app?

Is there a way to retrieve the user's phone number in an mobile app? I'm looking to build some sort of addressbook utility that builds phone numbers and let them dial the numers etc by making use of their current phone number. Is there a way to retrieve this information? I've found some ways to retrieve it in blackberry and android fro...

How to scroll from code to make a view shown in the screen?

I have a ScrollView which contains 1 button and 3 TextViews. Currently the button and the first TextView is shown on the screen and they occupy the whole screen. The second TextView is below the first TextView and is outside of the screen. When user clicks the button, I want the code to scroll the second TextView to be shown on the top o...

how to pull strings from an array adapted listview for a clicked list item

ok so i have an array adapted listview (the array adapting is done in another class).. i just got the click listener working for the list but now i want set it up so that when i click an item it pulls the strings from the clicked item and piggybacks them on the intent to a new activity.. i figure im supposed to use intent.putextra howeve...

how to kill sub activities and bring activity to top of stack

I have activity A that starts activity B which starts activity C A -> B -> C When a user clicks on a button in activity C, i want to bring A to the top of the stack and take B & C completely out of the stack. Is there a way to do this ? ? ...

iOS/Android GPS battery draw?

I'm investigating the possiblity of writing an app for Android/iOS4/both that would use GPS in the background. I found the "Receiving Location Events in the Background" section of the iphone developer documentation, which recommends that I only register for "significant location change" events. I'm not aware of any such capability in th...

Display Empty View in Android Gallery

Folks - I'm trying to implement a Gallery widget that displays an ArrayList of images, and I have started with the Hello, Gallery example on the dev site. This part is all working great. I need to have the gallery display an empty view (a special view when the ArrayList has no contents), but I cannot seem to get the Gallery to do this...

JSON Array iteration in Android/Java

Hi all, I am building an android app that needs to download and synchronise with an online database, I am sending my query from the app to a php page which returns the relevant rows from a database in JSON format. can someone please tell me the best way to iterate through a JSON array? I receive an array of objects: [{json object},...

How to Store and retrieve data from database when the device is in offline.

Friends, I need to store and retrieve data from database when the device is in offline.When i run my application when the device have internet it fetches data and shows it user,but i also need the same output when the device is in offline by saving previously obtained data in database,anyone help me to implement it in my applicatio...

Android application security when accessing a web service.

I'm building an Android application that needs to communicate with a MySQL database. The application isn't meant to be published, and I want the application to be the only thing allowed to interface with the web service I'll create for DB access. I've been thinking how I can secure the system, and this is the idea I've come up with. I'd...

Android SlidingDrawer, Hover SilidingBar

Hi, In my main view I have a window that users can slide up and down, here is a example SlidingDrawer The user has to click or drag the sliding bar to reveal the window. now how is it possible to change the sliding bar image to show a hover effect? ...

Using ViewGroup.addView() to add a GestureOverlayView to a SurfaceView game panel.

After much help from the good people here, I finally almost got my little game panel (thats a surfaceview class) up and running with a GestureOverlayView. Through the use of addView I finally was able to add the GestureOverlayView and get it to work, the trouble is that calling this: /** create the login form */ private ViewGroup _...

Android:How to display a Full Month Calendar Selector control?

Hi all, I want to incorporate a full month calendar selector like that of an iOS into my program. The one like this: However, it seem no one have come up with a control like that. Can i create a custom control like this and if yes, what is the best views to use for each date? a button view or a text view? I would really hope someone ...

Android ZXing preview poblem

I have embedded ZXing 1.5 in my app. I had tried to port 1.4 but could never get the camera preview to work properly on the Nexus One. I now have the exact same problem with 1.5. The preview window shows the preview box on the bottom right of the screen. It does the same thing on Sprint's EVO. The actual barcode scans properly if yo...

How can I set my options menu up so that there are only 2 buttons per row?

I was trying to set up my options menu so that there would be 2 buttons on the 1st and 2nd row and then 1 button on the 3rd row. Here is the code I was trying to use but I'm guessing groupID argument isn't what I thought it was. menu.add(1, MENU_NAME, 1, "by Name"); menu.add(1, MENU_NUMBER, 2, "by Number"); menu.add(2, MENU_POSIT...

How do I determine how much text will fit in a TextView in Android?

I have a layout that looks something like this: [TextView 1] [TextView 2] [ TextView 2 spill-over ] Essentially, I need the contents of TextView 2 to wrap to the next line, but start where TextView 1 starts. I was thinking that if I knew how much text would fit into TextView 2 before it runs out of space on line one, I could take the ...

Android Programming...How do I load contact photos so I can use them in an app?

I am trying to simply load just the contact photo of all my contacts and display them in a gallery.widget...Do I create a query? I was trying simply just to do People.loadcontactphoto but was getting errors....Any easy way to do this? ...

Android Soft Keyboard: How to manipulate views on keyboard on/off

Hi, I have a layout which has one large EditText view at the top + a bunch of buttons at the bottom. The EditText is made to shrink and expand when the ime is activated/deactivated by using adjust_resize. The buttons at the bottom are pushed up above the ime. I would like to hide these buttons when the ime displays, to provide enough s...