android

How do you manage battery health of your development devices when is always plugged in?

I know this question is not programming related, so for this I made community wiki. Developers are the best guys to answer the question. I am addressed to those that do development on devices that runs on batteries, like phones, gadgets etc. Probably you are constantly develop for them, and therefor they are always plugged in and charge...

Android question. If i create an Options menu with menu.xml, can I change the menu buttons' text size, color etc using xml?

Android question. If i create an Options menu with menu.xml, can I change the menu buttons' standard text size, color etc using xml? I would like to change text size, bold, and color. I would like to avoid using themes and styles for this application. Thank you for reading my question. ...

How to change the button fontsize without changing button size (in android) ?

I need to have a grid (created by program, not by xml) of equally sized buttons. They display text in different sizes. The problem is that when I change the text size to a smaller size, then the button automatically resizes to be smaller than the others. Thanks, Note: the grid is created adding *TableRow*s of buttons to a TableLayou...

Android Simple way for User Color Selections

How can you change application colors on the fly? I am currently using the following to change the background: LinearLayout mScreen = (LinearLayout) findViewById(R.id.main); mScreen.setBackgroundColor( mycolor ); I tried to use Style's to change the text using: @color/white The problem is that Spinners/Buttons and Spinner-Popu...

Issue with videoview on Android 2.1

Hi all. i am trying to play a video via streaming in my android application. Video playing functionality works good but whenever changes the orientation of the phone...a white screen comes over the video view and audio keeps playing. And after turning back to original orientation, video starts playing normally..(with proper video and au...

android: how do i open another app from my app?

I understand how to use intents and startActivity() when opening another activity within my own app, but how do you start a different app? specifically: -how do you determine if the user has the needed app installed on their device? -how do you start that app? -how do you pass parameters to that app? -how do you find all this info out ...

Android - Different ways of playing video

Hi All, I just came across the limitation of VideoView of not being able to play mp4 video files that are wider than 320 pixels. I was wondering how can we overcome these limitations. I am trying to make my app as forgiving as possible, so other than using VideoViews is there another way to play these mp4 videos? Chris ...

Send data after ACTION_SHUTDOWN is received

I know that the apps receive a ACTION_SHUTDOWN broadcast event when the device is shutting down. When an application receives the shutdown, is there still an opportunity to send data packets out, or does android block such attempts(or does the platform tear down the network stack before it can go out). ...

Is there a way to check ia TextView's text is truncated

Hi, Can you please tell me if there is a way to check a TextView's text is truncated in my code? Thank you. ...

Using intent.getStringExtra from within an activity

I am relatively new to android. I have two applications A and B. I have an activity in A, lets name it x, that would launch the application B. Now the intent sent by x contains StringExtra that I want the Starting activity in B to use. Is there a way for the activity in B to do that? Thanks! ...

Android 2.2 SDK breaks compatibility with older phones

I have recently updated my app to a build tarket of SDK version 8 in order to include the App2SD feature for my users. However I have had reports of devices on SDK 3 (1.5) having problems starting the application, with the following stack trace: ... E/AndroidRuntime(10638): Caused by: android.content.res.Resources$NotFoundException: Fi...

Log call information whenever there is a phone call.

Hi, I have written the android application and I want the application to send the call information whenever there is an incoming call and it ends. This way I would be sending all calls to the server irrespective of size of the call log. Here is the code public class PhoneInfo extends BroadcastReceiver { private int incoming_call =...

Android dev time vs iPhone dev time

Hi IF someone has to develop the same application for Android and iPhone, is it more difficult to develop in one platform than on the other? Does it take more time? Lets think about the average app. Lists, text , buttons, fetch information from the internet. Person has same experience on both platforms. Thanks ...

How do I get the current volume/amplitude in an Android MediaPlayer?

I'm working on an app that will both record an audio file, and then have the option to play back that file once it's been recorded. The UI has an EQ component that animates relative to the current amplitude of the recording. I've got the animation working via the MediaRecorder.getMaxAmplitude() method, but can't find any means to do th...

Android MapView: Disable auto zoom

Hi. I have made an Android app that shows a MapView with two overlays, one MyLocationOverlay and one custom overlay. I am programmatically zooming and panning to what I want the map to show. It also auto pans to my current location. The auto pan is moving the map away from what I want to show. So my question is simply: How can I disabl...

MVC pattern in Android?

Is it possible to implement the Model-View-Controller pattern in Java for Android? Or is it already implemented through Activities? Or is there a better way to implement the MVC pattern for Android? ...

iPhone + Android App to view Blog

What would be the best way to write an app for the iPhone OS and the Android OS that allows access to a web blog (posted on blogspot.com)? Are there ways to manipulate the incoming data from the website to fit the UI of the phones, or will I have to re-do a lot of the blogs? Any help would be nice! And thank you in advance! ...

Multiple Packages in an Android App

I am including a class in my app that another developer has made freely available. His class has a different package. Will this cause any issues on Android, the market, etc? Does every single class in the app need to be my own package? ...

Sliding drawer has 1 transparent pixel between handlebar & content pane.

I have created a sliding drawer with a handle bar and a content pane. There seems to be a single transparent pixel between the handle bar and the content pane. how can i get rid of this. here is my layout xml: <?xml version="1.0" encoding="utf-8"?> <SlidingDrawer android:id="@+id/drawer" visible="visible" xmlns:android="http...

Checkbox Context Menu

I have a ListView and an adapter in whick I create a linear layout and return as my created element. When this linear layout is just TextViews, the context menu appears normally, When I add a checkbox to the layout, the context menu isn't shown. Is there any solution to this problem ? ...