android

How to add layout from xml to Extended FrameLayout Android?

I have a custom class called NoteView that extends FrameLayout. Previously, I had just been using the stock LinearLayout and have an XML layout built already that I want to reuse by adding that entire hierarchy (with some other overlay views which is why I needed framelayout) to the NoteView. The problem is I can't figure out how to in...

Android HttpClient versus plain Socket ?

I'm currently involved in an android application whose basic purpose is to upload large media files. What is difference of using HttpClient for uploading large files over using plain sockets in Android ? From what I had researched I found out that in order to send large files to server I need to use 'multipart POST' but it seems it is po...

android dev: problem with mobile internet connection after phone wake up

Hello, I've encountered a problem with mobile internet connection after phone wake up from sleep mode. There is an application which updates some data periodically. AlarmManager triggers my BroadcastReceiver which starts service. service acquires PARTIAL_WAKE_LOCK and some http requests are sent. Unfortunately when update interval is qui...

Content of a inflated EditText

I'm having a hard time figuring out how to getText() as a readable String from a inflated EditText. I have a boolean method that checks something, so, in the onCreate method i call it like this if(method) { if(booleanVariable) { LayoutInflater factory = LayoutInflater.from(MyActivity.this); View child = factory.in...

Problem with playing mp4 video on Android

Hi, I wrote a small application that downloads an mp4 video from the net and after sometime plays it. The video is seen for about 1.5 minutes but after that it freezes surprisingly. Logcat shows: 07-11 18:35:22.132: ERROR/PlayerDriver(53): Content is truncated. 07-11 18:35:22.132: ERROR/MediaPlayer(867): error (1, 31) 07-11 18:35:22.13...

Android 2.2 why not move focus on homebutton when we use mouse Roll down or down focus

hi,all I have a Problem in android2.2 Launcher2.apk and I find it also on emulator . I cant not move focus on shortcut homebutton (like a house At all app bottom), when you use mouse roll down. but I do like this adb pull Launcher2.apk from /system/app delete Launcher2.apk adb push Launcher2.apk in /system/app so , it...

How to hide view when animation done in android?

I have a simple LinearLayout with two Buttons side by side. They are supposed to slide into and out of view from the right side of the screen when needed. I have the animation working and the rest of the work is done, but I have one last problem to solve. How can I set the LinearLayout's visibility to View.GONE after the slide out ani...

Android: A Verizon Droid puzzle

I am based in Germany and publish the "Last Call Widget" on the Android Market. I have been steady improving it over time, but one group of users still complain about it not working on their devices. My widget listens for the "android.intent.action.PHONE_STATE" intent, and then sets an alarm to update the last call UI in 20 seconds, th...

Set the layout weight of a TextView programmatically

I'm trying to dynamically create TableRow objects and add them to a TableLayout. The TableRow objects have 2 items, a TextView and a CheckBox. The TextView items need to have their layout weight set to 1 to push the CheckBox items to the far right. I can't find documentation on how to programmatically set the layout weight of a TextView ...

Android Icon for "open" or "load"

Is there a built-in Android icon for "open" or "load"? I'm making menu items, and I see ic_menu_save, but there's no ic_menu_open nor ic_menu_load. I guess I could just use ic_menu_add, but that's not quite right. I;m looking for a little folder or something. Surely others have needed an open icon? ...

Documentation on Android Hardware

Please provide good links for learning android hardware.. ...

Field Test Mode

Hi, How can I extract the following parameters for the field test: GPRS attach status, GPRS attach type, PTMSI, MAC mode, and RAU Timer From where can I extract these details? I did a lot of search in Framework component and i couldn't find any matching functions. ...

How to draw fullscreen in android?

I'm using opengl es 2.0 on android 2.2. My problem here isn't with the canvas, or creating a fullscreen android view, that I already have figured out. I'm wondering how you would set the coordinates of a GL_QUAD, or 2 GL_TRIANGLES to perfectly cover the entire screen, for use as a texturing surface for a 2D game, for example. I current...

Problems vertically aligning a Button and horizontally oriented LinearLayout within a vertcally oriented LinearLayout

Hi. Im posting from my phone so please excuse stupid typos and formatting issues. I have an activity which lists saved games that the player can load. I created a simple layout xml file which defines a ScrollView. On load, I grab all the saved games and programatically add a view for each saved game to a vertically oriented LinearLa...

How to build Android NDK sample: "bitmap-plasma"

I am trying to build the bitmap-plasma sample that is included with the ndk, but getting an error. I run ndk-build from the samples/bitmap-plasma directory, and the error it displays is that it cannnot locate android/bitmap.h file. How do i direct the ndk-build script to the file it needs? Using android-ndk-r4 on Ubuntu Lucid 10.04 ...

How does AppBrain's installation app work?

AppBrain has a fantastic new app that lets you automatically install applications on your phone using your web browser. Similar to the Chrome push. In their case, they are using it to let you install apps without a prompt directly on the phone. Engadget has a good video demonstrating their system. http://lifehacker.com/5582169/appbrain-...

Update Widget on System Broadcast Intent

I'm working on an Android widget that will show the current network state (i.e 1xRTT, EvDo Rev. A, WiMax, etc.). It may seem like a pointless idea, but for whatever the reason, the Evo doesn't differentiate between 1x & EvDo, it just says 3G for both, which is annoying if you're in a fringe 3G area. Anyways, to the point: I have the wid...

Android app always stops unexpectedly, trying to do event handler?

So every time I run this code my Android app stops unexpectdly, and i dont get why... import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.Button; import android.widget.TextView; public class TheStupidTest exten...

Master-detail Using ContentResolver.applyBatch()?

Hello, I was wondering if its possible to save master and detail records to a content provider using the android.content.ContentResolver.applyBatch() method in the same operation where subsequent ContentProviderOperation items in the providers parameter depend on the result of previous items. The problem I'm having is that the actua...

Send List to new activity.

Im trying to send a List to next activity the list List mGF = new ArrayList(); i cant figur it out... i have read and try for days... Intent i = new Intent(mContext, ViewImages.class); i.put....? (mGF); How do i send and how do i get it as mGF in the next activity hope you understand ...