android

Want to change LinearLayout layout at runtime

I've been searching, but can't find a way to do this. I want the ability to re-arrange Views in a LinearLayout, without specifying specific pixel locations, at runtime. for my proof of concept, I have a layout with 2 TextViews, one red, and one black. The red TextView is on the left. I want onClick to set it to be on the right, witho...

Basic encryption on Android

I have seen the example here. All well and good and I understand it, however it relies on the bounceycastle library for the provider. I don't want to bundle any additional third party libraries with my app if I can help it. I don't need fort knox style security, just some basic symmetric encryption for transmitting over the wire. How can...

How to find Back Button Using Android ?

Hai All, Can anyone help me, how to go the previous page from Current Page. For Instance: First User Clicks Music Page it invokes a WebView wich displays the Music Url & then the User Clicks Back button, At that time previous page(ie Music Page) must be dispalyed. Thanks in Advance, Tilsan ...

Android AlarmManager RTC doesn't pause while device is sleeping

Hi, I wrote a little widget for Android devices. The widget uses AlarmManager to set recurring updates. I'm using the RTC clock for the AlarmManager. According to the documentation, if the device is sleeping, the RTC clock wont wake up the device and the next update will be when the device is woken. I have a log file for the widget w...

zxing how to decode from a file?

Hello all, I am developing an application based on the zxing library and I would like the user to be able to decode a photo that is stored on the sd card. I have found an example under the androidTest example but when I tried to use it I found that in class BenchmarkThread in line 96 eclipse complained that HybridBinarizer is not known....

Using DDMS to send KLM coordonates

I made a small test application that uses the GPS module. To test it, I used telenet to connect to the emulator and send geo fix coordonates. Sending geo fix 90 90 from telnet made my application react ok. After reading a while I found about the DDMS. There seems to be a problem with sending coordinates from it to the device. No matter...

Android, wide or multiple screens.

I'm new to all this. I have 2 Android Application Development books that I've read through, but I still don't understand somethings. I was trying to make a 'flash card' type program for my daughter. I already had images had up since I had printed them out previously. But I can't find anyway to display them. The closest I got was cre...

Notification Resume Activity

I know, there are several questions of this type but I tried everything of it and it still doesnt work. Ok, for my app; I've got an Activity. In this Activity, there are 4 Tabs, and the fourth one contents a list and a record button. When I am pushing record, there is a GPS Listener which starts. After getting a new gps value, it pushs i...

Using the IF statement to see what intent started the activity - ANDROID

Hi there Hopefully this is very simple. I have a central activity that can be launched from two separate classes. I was hoping that in this central activity I could have an IF statement like if(this.getIntent() == MainMenu.class) { // Do something here } But obviously that isn't legal so how could I structure an expression to chec...

How to get focus to GridView First Image Android?

HI, Iam writing GridView by using BaseAdapter with 2 columns.Each column with One Image and Text.It works smoothly.I had given focus by using below code in onConfig... public void onConfigurationChanged(Configuration newConfig) { gridview.requestFocusFromTouch(); gridview.setSelection(0); } It works when my view configuration...

Images and Audio in an Alert Dialog

Hey guys, I'm using the following tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html in order to create a map view and plot points on to it. I have all of that done fine but now I'd like to embed an image and even audio within the Alert dialogs that pop up. Is this possible in the current context? How wo...

Make Preference look disabled, but still register clicks

So during certain states in my app, I want to disable certain CheckBoxPreferences in my setting-menu. However, if the user clicks them, I want an explanatory toast to be shown. If i just do setEnable(false); on the CheckBoxPreference, I do get the right look and feel. But I cant get a toast to be shown on click. On the other hand, I have...

Android "misses" periodical execution of Thread using ScheduledExecutorService

Hi, I have an android app that repeatedly collects fingerprints from the wifi-networks that are around (for scientific reasons, not to invade anybodies privacy). Anyways, imagine I have a function that does this work and it's called scanWifi(). I initally wanted to start it like this: ExecutorService mExecutor = Executors.newSingle...

Help with a loop

I'm looking for the best way to do the following.. I've got a loop like so... while(mcursor.moveToNext()){ String tname = mcursor.getString(4); String tmessage = mcursor.getString(7); String tlink = mcursor.getString(5); String tsname = mcursor.getString(3); Double tlat = mcursor.getDoubl...

NoMethodError on standard Android runtime object

Heya, I get a very strange error that I just cannot sort out when attempting to serialize objects to JSON on all android platforms, from 1.5 through to 2.2 (both on phones and emulators). I receive this error: E/AndroidRuntime(21017): Uncaught handler: thread AsyncTask #2 exiting due to uncaught exception E/AndroidRuntime(21017): java....

sdcard in android

Hi friends i want to clear sd card memory via android coding Thanks ...

Android Resize MapView after Visbility change

I've got an activity with the following layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <com.google.android.maps.MapView android:id="@+id/m...

android preloading stuff

Hi, I use webviews and html/css/js to make some of my app's UI. (easy to do in iPhone and easy to port from there) as a structure i have a native view that takes me to a tabbar and each tab is an activity with its own webview that load a rather complex local (from assets) html. the first load of such a tab takes about 1 sec on the emu...

Paint on Canvas in Android's browser, page scroll?

I'm trying to make a canvas where the client can sign his name. It works well in Chrome v6: but on Android 1.5 instead of drawing the browser scrolls the page and draws nothing: I borrows the code from Opera's website. Can I disable the scrolling or how can I make this work? Thank you! EDIT using the events touchstart, touchmove ...

Android limit number of choices in a list specified as MultiChoiceItems

In Android, I have been attempting to add functionality to a multiple choice list that pops up in a dialog. (see http://blog.350nice.com/wp/wp-content/uploads/2009/07/listpreferencemultiselect.java) The issue is that I want to limit the number of choices to 3. Say I have a list of US States in my list, and I only want someones 3 favor...