While using network provider for location updates, I found that it is the same time that I set on my device. Can it not be that provided by network as it goes when it is GPS. Or if network provider cannot provide time , then atleast location.getTime() should return 0 instead of device time. Is there any way to avoid device time, as I wan...
Hi All.. I am getting this exception while I am trying to call an activity from another one.. .The complete exception is
android.content.ActivityNotFoundException:Unable to find explicit activity class {com.x.y/com.x.y.class};
I am doing an intent.setClass("com.x.y","com.x.y.className") where className is the name of my activity class ...
I can't call setContentView to show XML layouts - I can only get a RelativeLayout which I can programmatically modify. Now, what I need to do is add a simple TextView, aligned at the bottom of that RelativeLayout. With XML it would be as simple as:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orient...
Hi guys,
I am trying to write a method that determines if a contact has at least one phone number, at the moment I have this:
public boolean hasPhone() {
Cursor phones = this.map.getContentResolver().query(
ContactsContract.Contacts.CONTENT_URI,
null,
ContactsContract.Contacts._ID + "=" + this.contactId,
null,
null
);
bool...
I have a TextView inside the same RelativeLayout as a chunk of ImageView derived custom classes. I'd like to be able to write to the TextView from inside these other Views. How do I do this since I am unable to use findViewById due to it not being a child?
...
I want speed factor in my GPS application in android. I want to use both network provider and gps provider both to get location updates. But network provider hardly gives speed. While GPS provider provides fix many a times.
But is it so that once a fix is found without speed, device will not request for new update until the interval or...
I've been trying to figure out the best way to handle local database access in my android applications. I had been creating a database connection object in each activity but this seems like a really inefficient way to do things. Doing some research I stumbled onto this discussion. Using a Service seems like a great way to do things, but ...
I have an application that queries a server (not under my control).
The server returns a serialized object. I have the model for the class - however the problem is that the class is in "default package"... something not recognizable by Android ClassLoader.
How can I resolve this issue?
...
Hi,
I am an android application developer. I am currently developing an application which requires of me to display an image stored in an sqlite database, Could anyone guide me on how to retrieve an image from a sqlite database and display it...
Thanks..
...
We have made a device which can act as an USB host or slave and processes the data it receives. I want to use the Android phones to send the data to it via USB.
My research leads me to conclude that we cannot use Android devices in USB Host mode without modifying the hardware or OS. Doing so is not an option as this is going to be a com...
Hi,
I am trying a small program on the emulator
int frequency=8000;
int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;
int audioEncoding = AudioFormat.ENCODING_PCM_8BIT;
bufferSize = AudioRecord.getMinBufferSize(frequency,
channelConfiguration, audioEncoding);
I keep getting buf...
Is it a good practice to define the alphabetic shortcuts (alphabeticShortcut) of the menu items?
I ask because I've never used them in any of the Android devices that I have owned, even those that have a physical keyboard. Is there any reason to define them? Maybe an accessibility use-case than I'm not seeing?
...
I'm working on my first android app. So far I have an activity that reacts to clicks on the hardware volume controls. That's was easy to do, but I'm wondering if there is a way to make it so the app responds to these events from the hardware buttons even while the phone is locked?
I'm really looking for a confirmation of whether or no...
I am developing an application where I need to take snapshot in portrait. But portrait mode is supported only in 2.2. So I was thinking would it be a good workaround to follow these steps.
1. Design the capture image activity such that all options are to the right most of screen and vertical
2. Now force the activity to run in landscape...
I have a grid view of buttons that is generated by a CursorAdapter. When the CursorAdapter is passed to the Gridview the view renders correctly however the first item in the grid does not fire the OnClickListener event.
If I select another button in the grid, the event fires correctly however if I selected the first button then another ...
Using this tutorial at this section 4.5 :
http://www.vogella.de/articles/Android/article.html#first_uiproperties as a
guide, I attempt to "Select the complete widget and use the Properties view to
set the property "background" to the color attribute "myColor"."
I can select the widget, highlight the 'Background' property, and when i pr...
Hi,
I've been through different tutorials and this website, but couldn't find a proper solution. On the other hand, I've seen apps logging into websites and requesting further information, so I'm sure there's a way to get this working, but maybe my approach is all wrong.
Here's what I'm trying to do: I want to log into a website that n...
I am building Android apps and have an HTC Desire with running 2.1 of Android.
How do I upgrade, or even downgrade, OS on the phone to test the app on real devices as well.
...
In an Android app, I am looking for the functionality of the .NET string function [Trim('aaa')] which will trim off the text "aaa" off a string. I don't think this is natively available in Java and I haven't seen that functionality in Android Java textutil library.
Is there an easy way to have a Java app trim a set of characters from th...
Hi I am totally new to Android and my first assignment relates to QSB. When you tap on the QSB it expands and occupies the length and breadth of the home screen, but in my case after expanding one could still see a little portion of the background window at the bottom. Pls help!!
...