android

android - Using custom layout throws InflateException causing app to force close

I am using Eclipse and created HelloWorld and it works fine using emulator. Then I tried to create ToDoList app where you can enter text and click to submit, following the example on the book I have and getting an error that cause my app to force close when I interact with the application. my directory structure: (please ignore other fo...

Android: Measure Size of View before rendering

I have a TextView that displays text that changes and run time. I want to use the View.getLineCount() method to see how many lines the TextView takes up and do different functions accordingly. The problem is I need to determine the number of lines the TextView takes up in the same method that needs to know how many line it takes up. I ha...

How to check updates on a website from an app?

Hello, I have a Website, which is built upon a CMS, written in PHP. And now i'm trying to develop an App. I want the app to check for Updates on the website every time it starts, for example, if a new article is added to the website, a news about this publishment should be displayed on the app. My knowledge in this area is very poor. C...

Is there a guide on learning iPhone development from the perspective of an Android developer?

I consider myself an Android developer, after having created four apps and learned a lot by creating them. Now I've begun my venture into the iPhone app development world, and I don't remember the Android learning curve being this extreme. It doesn't help, though, that I was very familiar with Java and Eclipse whereas I hardly even know ...

How to display defaultValues the first time a PreferenceActivity is started?

I've defined my preferences in an xml file, preferences.xml. I've also got a SettingsWindow class which extends PreferenceActivity. I've set the android:defaultValue attribute on my preferences in the xml file but they don't appear the first time the app is launched. How do I load the default values defined in the xml file into the Setti...

Android OpenGL extending GLSurfaceView null pointer exceptions

I am trying to create a simple 3-D app for android that will have an additional view layered on top of the OpenGL view (much like the SurfaceViewOverlay example in the API demos). I'm running into an issue trying to implement that method with an extended GLSurfaceView class. I've set up an example where I'm trying to do a combination of ...

Get Map Bounds Using Android Google Maps

Hello, I was wondering if there was any way (I'm somewhat a newbie at Java) to get the MapBounds of a Google MapView on Android. Just to clarify, here's what I'd like to do. Calculate the maximum and minimum long and lat whenever the map is moved, or zoomed and display those values in a Toast. Is there any possible way to do this --...

Prebuilt android avd?

Are there any places where you can download prebuilt android images? This would be allot easier than trying to guess what settings each device has. ...

Updating Android app properly?

Help! I updated my android application on the market. This update included a change in the databaseHelper file where I put in more data and tables. Normally, when debugging, I would have to uninstall and reinstall the app because it doesn't see the new values in the database. Now, it's doing the same thing on the market. Why is this ha...

How to efficiently store bitsets on Android.

My application requires me to store sets of bits along with some accompanying metadata on the Android platform (read only for now). Now obviously I could just implement the Serializable interface, but I hear it's very slow on Android (I can imagine has to do something with the custom VM and compiler that makes such reflective features in...

How can one get the appwidget's own ID?

I am trying to debug a problem where my widget becomes invalid and a new one fills in. This only happens once at the beginning of time and then it remains the second widget forever. So, I want to put code in to narrow down the point in time when it happens. What I would like to do it something like this: e.g., (not real code) Log.d(T...

Get Selected Image File Location in Android

I am currently making an app which works with images. I need to implement functionality where the user picks a file stored on the SD card. Once they pick the picture (using the Android gallery), the the file-location of the image will be sent to another Activity, where other work will be done upon it. I have seen similar posts here on...

How can I use a different CSS using jQuery?

I was designing a mobile version of my website but then realized I need to support at least three (iPhone, iPad and Android). In that case, I was thinking of using jQuery for the task where I would first detect what device it is and then load the appropriate CSS. How would I go about doing this? Is it something like this? And is this eve...

How to capture preview image frames from Camera Application in Android Programming?

I am writing an app to capture the camera preview frames and convert it to bitmap in Android. Here is my code: Camera.PreviewCallback previewCallback = new Camera.PreviewCallback() { public void onPreviewFrame(byte[] data, Camera camera) { try { ...

Fail on trying to findViewById for nested TextView (within ListView)

Trying to have a ListView (scrollable list) of rows made of two TextViews. I have a list of items from a database that I want to populating into the LinearLayout->ListView->TextView but can't get to the id... Layout somewhat like this instructional link, but have backed away from RelativeLayout and using LinearLayout to get it workin...

Can I remove Android default link styling in webview

When you click a link in the Android browser, the target link area gets highlighted with an orange box by default. A longpress then opens up the context menu for link handling (copy, paste, new window, etc). Is there a way to disable either / both of these in webview? I'm using the highlight code in scriptaculous and the default andro...

Android Facebook

I am working on an Android app where we enter some text in edit box and all i want to do is simply send the text which typed (i.e.., edittext.gettext()) to facebook as my status. The important thing is i dont want a facebook dialog box to open just send the message as status without a dialog box. Is there any way i could post without usi...

audio and video recording erros in android

Hi to all, We tried the following code.without video code audio is recorded. it is working fine but when add the video code the file is create with zero bytes.I am new to this topic.please help me. i got some errors.these are after the code the code is : public class videoAudio extends Activity implements SurfaceHolder.Callback { p...

How to specify arguments when starting Android emulator in Eclipse (to wipe data).

I have read that in order to clear data stored in the Android emulator I should start the emulator with the "-wipe-data" arguments. However, I can't see how to specify startup arguments. I have read that it should be possible to specify these in the "Target" tab of the Debug Configurations dialog. However, if I open Debug Configurations ...

Android: Problem when device require PIN

Hi all, I dev a widget get some infos on the line and network, all works fine, but if the device is set to get PIN code on start my appwidget go in force to close.....there is a way for to tell to the broadcastReceiver to wait until the device is ready? ...