android

Relative stacking with Linear Layout in Android?

I have 6 images I want to display as 2 rows with 3 images in each. I'm using nested LinearLayouts to achieve this, and it works well except for one thing: The height of the largest image dictates the size of the linear layout, meaning there is empty space a lot of the time. In other words, my problem is as follows: I keep getting the ...

What does Oracle's lawsuit against Google mean to Android developers?

What does Oracle's lawsuit against Google mean to Android developers? I know this is not a programming related question, but I can't think of another forum where I can ask this. ...

Android App, "source not found" debug error - tried downloading Android Source Code

I'm getting an error in my Android app that says "source not found" and crashes the program. I've already read a number of posts saying that the solution is to download the android source code and load that up in Eclipse, but I tried to no avail. Here is a bunch of information that may help with my problem, let me know if you need more!...

2D game on Android SurfaceView runs slowly on touch

I am building a 2D game with Android SurfaceView. When I touch the screen the game animation runs slowly. Why, and how can I avoid this? The touch events are stubs just like onTouchEvents(MotionEvents ev){ empty };. All of the game logic and graphics draw code are in run() in an extends Thread class. ...

Using OpenGL to replace Canvas - Android

I am attempting to replace the Canvas-based rendering system that I already have with the faster opengl-es surface, however, I can't seem to get an openGL renderer to conform in such a way that it acts as 2d field, rather than a perspective view. My current code for the renderer looks as follows: @Override public void onSurf...

Android: Progress Dialog Doesn't Show

I have some data I load into the database the first time a user enters my Activity, and want to show a ProgressDialog while this data is loaded for the first time. My Activity is an ExpandableListActivity and I don't create the SimpleExpandableListAdapter or call setListAdapter passing my adapter until I'm sure the data is actually there...

How to draw a bitmap on Android using OpenGL

Hi all, I have a byte array of RGB values, just like the contents(without header) of a *.bmp file. What I want to do is, draw the corresponding bitmap on Android, using OpenGL. It seems that OpenGL ES doesn't have a single API that will do, it true? If true, how can I do this? PS: Actually, I can draw it in JAVA code, but it's too s...

Using FileDescriptor with HTTP URLs in Android?

I was hoping this was going to work for getting Android's MediaPlayer to stream from a URL using authentication, but now I'm not so sure. I have no problem getting it to stream from an open server (no authentication) but I don't see any way to tell MediaPlayer to use basic authentication unless perhaps using the FileDescriptor argument w...

Apache Server connection authentification

How would I go about having my android app be able to automatically enter a set password and username to gain access for a file on my apache server? I know that server side it would be php and obviously java for the app, but i am somewhat new to this and any examples or sites with tutorials would be greatly appreciated/. ...

java.io.FileNotFoundException when using RandomAccessFile to create file

Hey guys, I'm encountering a FileNotFoundException when I try to make a file using RandomAccessFile: RandomAccessFile file = new RandomAccessFile("/test.jpg", "rw"); I don't now how to get around this. It's driving me nuts. Thanks ...

Android SENSOR_PROXIMITY/SENSOR_LIGHT on Motorola Droid (Milestone)

Hi! I'm trying to read the status of the Proximity sensor (also I tryed to read the Light sensor...) using the following code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); txtStatus = (TextView)findViewById(R.id.txtStatus); sensorManage...

Measure start/pause/duration of video in android

Hi, How can I measure the start,stop,duration and pause time of different video which is streaming from website? ...

Android service startId parameter

So I understand the service lifecycle and all that. But I'm confused what the startId parameter is for? public int onStartCommand (Intent intent, int flags, int startId) I get that it's used in conjunction with stopSelf(int), but I don't see what the point is or where the startId is being generated. What use case would using stopSelf...

Using Camera and storing captured result in SDCard in android

Hi, I want to make application in which i want to use camera as after the image is captured, i want to store that image in SDCard and display that image in Screen too. Can anybody help me ... Thanks ...

How to handle callback from Search Manager?

Let's assume the following: Activity A calls Search Manager User searches, and search results are displayed in Activity B User clicks on a list item in Activity B App switches back to Activity A I am unable to handle this callback from Activity B to Activity A because I don't have the Search Manager intent (i think?). Call Search Ma...

passing an array in intent android

So I've always been under the assumption that you can't pass arrays between activities with extras. But I was just going through the Bundle class docs and saw putStringArray(String key, String[] value) and public String[] getStringArray (String key). Are these new? They both say since API lvl 1, but I don't remember being able to pass ar...

is there a way to access the pixels of a video?

Having a video file, there is any way to access single pixel values? thanks in advance! ...

How to pass objects between two activities?

I want to pass an object from Activity B to Activity A. Scenario: - Activity A calls Activity B - User selects item in Activity B - Activity B passes an object to Activity A How do I accomplish this? And in which method do I read in the passed object in Activity A? ...

switch screen orientation in both direction

Hello, is there a way to implement rotation in both direction in my app? I already know that Froyo support this, but I'm using sdk 1.6. Thank You for help ...

timezone example in broadcast receiver

Hi friends, I am trying to implement time zone change in broadcast receiver but its not working .my requirment is if i change the time zone it will go to another activity using broad cast receiver can anybody give example Thanks ...