I have two AsyncTask Activities, whose sole responsibilties are to execute an AsyncTask on the UI Thread. One of them works great, displays the progressBar, and updates the ProgressBar message. This is for my SearchActivity, which is actually a search activity with the Google Search metadata for declaring a search activity. I created a c...
I have an array of all the URIs of the images which I am showing in a List.
Now I want to run a thread in background which gets this images from web and store them on the SD card.
So when I click a particular element in the list instead of fetching from web it should fetch from the SD card in the new activity.
How do I do this?
...
I'm just getting started with android programming,
playing with HelloWorld and Eclipse.
I'd like to know how to install my apps to my samsung Galaxy S
...
This part of my code checks to see that when the user clicks on a contact, the contact actually has a phone number, otherwise a message is displayed and nothing else is done.
I am confused as to where my null pointer exception is coming from....
Uri contactData = data.getData();
Cursor c = managedQuery(contactData, null, null, nu...
I received the following error when attempting to switch between a ProgressBar and an Image using a viewSwitcher:
07-30 18:08:00.627: ERROR/AndroidRuntime(307): Caused by: java.lang.NullPointerException
07-30 18:08:00.627: ERROR/AndroidRuntime(307): at android.view.ViewGroup.addView(ViewGroup.java:1815)
07-30 18:08:00.627: ERROR/And...
The default Contacts app in Android has a very handy Quick Action menu when you tap on user's icon.
I would like to know whether anyone has been able to attach their own app to this menu and if so how they did it.
I would like to avoid writing my own contacts app just to provide a feature.
...
Like the title says, I am thinking about developing my own browser for Android devices.
My first thought is to know what kind of possibilities I have, before I begin creating my software architecture. Are there any (open?) Browser Engines you could include into your library and reuse them?
(There are some unknown browsers in the Android...
Here is my broken eclipse.ini I editted it several times, and Eclipse is crashing. Last time it crashed I was submitting a Mylyn Task ticket to Trac. This was my last edit, using the Eclipse site for Windows:
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-startup
plugins/org.eclipse.equinox.la...
I have a ListActivity whose layout looks like
<?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">
<ListView android:id="@android:id/list" android:cacheColorHint="@color/transparent" style="@st...
I am presently using the following peice of code to load in images as drawable objects form a URL.
Drawable drawable_from_url(String url, String src_name) throws java.net.MalformedURLException, java.io.IOException {
return Drawable.createFromStream(((java.io.InputStream)new java.net.URL(url).getContent()), src_name);
}
Th...
I'm working on an app right now which uses subclassed ImageView to show an image with a bounding box over part of it.
Right now the box is drawn in yellow no matter what, but I think it would look a lot better if the color matched the system's button pressed color, such as orange for the Droid, green for the Evo, or blue for the Galaxy ...
I have problem when i try to read a .key file. This file is created by a normal java (J2SE) and i read it from android application. When i read this file from android it gives me nothing and i have done some debugging and i noticed that it can't read the file. Also i have checked if i can read the file (using file.canRead()) and it appea...
I am having a real hard time on putting my activities in tabs. I have an activity that parses an XML file and puts them on a list, and it works perfectly on its own. When I call it on a tab however it does not work (i get the dreaded "Sorry! blah blah.. has stopped unexpectedly" prompt... BTW yes I did the manifest).
I have migrated th...
I'm calling this tasks:
TimerTask taskA = new ThreadA(this);
TimerTask taskB = new ThreadB(this);
tasks.add(taskA);
tasks.add(taskB);
timer.schedule(taskA, 10000);
timer.schedule(taskB, 5000);
And here are the two TimerTasks:
public class ThreadA extends TimerTask {
private Ghost ghost;
public GhostThread(Ghost ghost) {
...
When I start the SMS application using the following methods -- everything works fine up until the point where the message is sent. When I send the message -- it never navigates back to the original activity unless I press the back button. How can I start the SMS activity and then once the message is sent have the parent activity showed ...
I have used SearchManager and it provides search key only when app is launched. Is there a way to put a text box on the home screen/wallpaper and invoke activity when user presses enter?
...
Developing my first app for android. Works OK on emulator, but on phone I get a "Source not found error" ViewRoot.handleMessage(Message)line:1757. I get the error when I press button number 4 on the application and try to display my media images on phone
Code
package com.example.famiily_connect_v1;
import android.app.Activity;
impo...
I am trying to create a dynamic body that orbits around a static body in Box2D.
I have a zero-gravity world, and a DistanceJoint that connects the two bodies. I have removed all friction and damping from the bodies and the joint, and am applying an initial linear velocity to the dynamic body. The result is that the body starts orbiting, ...
Hi, i'm trying to get a query that returns rows only with a specified name, and sort descending by week (integer).
Everytime I try and run it it gives me a FC and logcat says
ERROR/AndroidRuntime(728): android.database.sqlite.SQLiteException: no such column: New: , while compiling: SELECT Name, Week, Total FROM notes WHERE Name=New OR...
I was informed in a later answer that I have to add the GestureOverlayView I create in code to my view hierarchy, and I am not 100% how to do that. Below is the original question for completeness.
I want my game to be able to recognize gestures. I have this nice SurfaceView class that I do an onDraw to draw my sprites, and I have a th...