android

Get three-letter short timezone name (as opposed to four-letter)?

I've written an Android app that needs the short timezone name in which the handset is currently located. I'm using the following code: String timeZone = Calendar.getInstance().getTimeZone().getDisplayName(false, TimeZone.SHORT); When running in Chicago, this returns "CST". In New York, "EST". In Strasbourg, France, it's returning ...

Various GPS Android Functionality Questions..

Hello - I have a few questions (so far) with the the LocationManager on Android and GPS in general.. Feel free to answer any number of the questions below, and I appreciate your help in advance! (I noticed this stuff doesn't appear to be documented very well, so hopefully these questions will help others out too!) 1) I am using the fo...

Correct use of setEmtpyView in AdapterView

I'm really having trouble using the setEmptyView method. I tried it to implement it in GridView and ListView, but both of them didnt work. Here a sample codeblock: networkGames = (GridView) baseLayer.findViewById(R.id.all_game_grid_network); networkGames.setBackgroundResource(R.drawable.game_border); networkGames.setSelector(R.drawab...

Can't find method in the activity

I'm starting with Scala + Android (and using the sbt android plugin). I'm trying to wire a button action to a button without the activity implementing View.OnClickListener. The button click fails at runtime because the method cannot be found. The document I'm working through says that I need only declare a public void method taking a Vi...

How to Identify a ListViewItem to Update a Single Row

I have a ListView displays information about an object. When I click a ListView Item, I open an Activity that let's me manipulate parameters of the object held in the adapter. These parameters are updated and stored remotely. When I return to the ListView (via the back button), I want to update the ListView Item that I clicked originall...

Android - Using Camera Intent but not updating correctly?

Hello - I am using an intent to capture a picture: Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment.getExternalStorageDirectory(), "test.jpg"))); startActivityForResult(i, 2); And then once taken I do the...

Android show listview.

i want to show this array as a listview in a new screen when a button is clicked. ArrayList<String> favorite = new ArrayList<String>(); this ListView is a small part of my class. i cant seem to figure out how to implement it with my code (i can figure out how to create a listview in a separate application, and set the onitemclicklis...

Randomly generate sound from onClick and onShake events?

I've literally looked everywhere on the net and found very little clarification on how to do this. Pretty much, I have 8 sound files laid out in an array.xml file and I need to play a randomly chosen file ONCE per or onClick or onShake. First off, what technique should I use to achieve this? ARRAY->RANDOM- STRING->PLAY? RANDOM...

Linear Algebra Library For Android

Does anyone know what will be a good library for computing linear algebra in Android (SVD, QR, LU, least-squares, inverse, etc) ? ...

Android Accelerometer Gravity Compensation

How do you accurately compensate gravity such that I can know the magnitude of the acceleration due to my hand movement in the x-y-z component using the accelerometer data ? ...

How to call android application from javascript

I want to call android application from JavaScript. ...

Android - Custom Widget doesnt update

Hi, I'm trying to make a widget to my app, but it doesnt update. I just need to change the textview text and open an activity when a press a button, but none of them works... the code public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews views = new RemoteViews(c...

How to find the timezone with "HNEC" short name?

My Android app is using this code to get the short name of the timezone in which the handset is located. String shortDisplayName = Calendar.getInstance().getTimeZone().getDisplayName(false, TimeZone.SHORT); For my user in Strasbourg, France, shortDisplayName is "HNEC" (I haven't learned yet exactly which locale is in play). I'm tryin...

Documentation for extra in intents for Android

What documentation is there on the extras will be provided with Android intents? Update: I did some further investigation. I understand that we can are meant to assume each intent to parses no data or extras unless explicitly documented. Additionally, some, but not all, extras mention which they are applicable to (see the android docu...

Creating a Stack Overflow notifier

I could not find a Stack Overflow notifier Android app so I am planning on making one. I hope that my app will serve a similar purpose as the Stack Overflow Notifier Chrome extension. This will be my first Android app so I am still unfamiliar with the platform. So I currently plan to ask the user to login by bringing up a WebView and ...

Android Google maps co-ordinates

I have an app which stores co-ordinates. I am using Google maps to show the location to allow full use of the maps app. I am using the intent call and placing the co-ordinates in the q=xxxxxxxxx,xxxxxxxxx part. This works, however when Google maps shows the location it often finds a point on the road, sometimes a little distance from th...

manually put files to android emulator sd card

Hi guys, I'm just having trouble with getting my emulator SD card work... I created a new AVD device with a new SD card. So how to put data onto it? I found the "correct" file to be mountet on Deamon tools, but is currupt or simply not readable... It would be great if you have any idea :) ...

Why StrinUtils Apache class is not recognized in android?

Why import org.apache.commons.lang.StringUtils cannot be imported in android by default. Do i have to include an external library? Then where can i find that library on the web? package com.myapps.urlencoding; import android.app.Activity; import org.apache.commons.lang.StringUtils; public class EncodeIdUtil extends Activity { /**...

What is Pending Intent?

I am newbie to Android. I read the Android documents. Can anyone tell me what "Pending Intent" is? ...

Determining north using the android phone

I looked over SensorManager and was still unsure, how do I detect if the phone is looking at true north (or any other direction for that matter). ...