android

Android: how to start a service at boot based on user-settings?

Hey everyone, I'm trying to write an app that consists of an activity that manages a background service. However, I want to implement a user setting for automatically starting the service up at boot time. I have user settings implemented with SharedPreferences and I have the services starting up at boot by using a BroadcastReceiver and l...

Android MapView with High Res tiles?

I have created a simple map app that shows the local garage sales in my town. It was simple enough to create and I parse out the Google Maps (html) xml doc that the local paper uses on their google maps mashup on their website. I have noticed that the Map Tiles used in the MapView class are not as high-res as the tiles used in the real ...

MultiView for media files on Android 2.1

Hello, I'd like to play multiple video files at the same time on Android 2.1 (up to 4). It's possible to reduce the resolution of the video files and display them all on the screen, but it seems only one file is playable at a time. I tried then to use threads in the hope that this might help, but it doesn't. Only one video is played. A...

Data roaming in android

hi, Here's a question that comes from an unclear view of how things work : can a a phone be data roaming without being voice roaming ? If so how can a begin data roaming event can be detected ? This question came to me from the DDMS options , where one can have" data roaming " and "home voice" . ...

Preferred Access point name

Hi, I'm hoping that someone will explain to me what preferred access point name refers to in the android system , and what is it's role . Also I'd like to know if by messing with all APN (adding a suffix to the "apn" and "type" fields to disable 3G/EDGE/GPRS connections , and the deleting this suffix ) , the preferred APN can be disrupt...

LatinIME Donut build Errors

I'm trying to build LatinIME, but have a total of 35 build errors: 1x BackupHelperAgent cannot be resolved to a type 1x BackupManager cannot be resolved to a type 2x com.android.internal.R cannot be resolved 25x mScrollX cannot be resolved 1x SharedPreferencesBackupHelper cannot be resolved to a type 1x The constructor Vibrator()...

Android Animation/GUI Behaviour

I have here a button which calls a very long lasting calculation. To indicate this to the user, i want to display a loading symbol. The calculation is called in this method in a extra thread (LoadingAnimationThread); @Override public void onClick(View v) { BookView bookView = (BookView) lexs.startBook(); ...

Is there a good tool for doing Android layout design?

I have tried DroidDraw and the Eclipse layout editor and both seem very difficult to create anything other than very simple layouts. I find myself dropping back to the XML file to be able to manipulate it. Has anyone found any good tools to design the actual screens? I am not looking for a mock-up tool... but an actual tool to create...

Looking for an approach to program a mobile website for any device. Are there any?

My wish is to know how I can program a mobile website, that fit to all mobile phones. Are there any special approaches to recognize a device and render the code according to it? Which tools and coding languages are required? My first thought was to hold the website in XML, which would be parsed depending on the device. You have to c...

Eclipse wont open Android Xml files

I'm just starting with Android and everything seems to be working fine, but when I try to look at any XML file in eclipse, I get the following error. The only way I can see them is by "Opening With" -> TextFile. org.eclipse.core.runtime.CoreException: Error opening the Android XML editor. Is the document an XML file? at com.android.id...

MapActivity using Google Earth Enterprise

Is it possible to have a MapActivity that gets its data from a Google Earth Enterprise server on an Intranet? If so, how? ...

How do You Center a TextView in Layout?

I have a complex layout, part of which features a value centered over a label, with + and - buttons on either side of the value. I want the value to center between the buttons, whether it is "1" or "99". It looks fine when it's a 2-digit number like "99", but when it's a single digit the number is left-justified. How do I properly cen...

Android - Video Restart or Resume

Hi everyone, I am writing a simple android application with a class that extends activity, that plays a video from a url on the web. There is a button on top that on click takes the user to a web page. What I want to do is when the user is browsing the web page, if he hits the back button, I want him to come back to the main activity ...

Android: Create spinner programmatically from array

Hi, I'm all new to Android and I'm trying to create a spinner programmatically and feeding it with data from an array, but Eclipse gives me a warning that I can't handle. Here's what I got: This ArrayList holds the elements that should be in the spinner (gets filled from a file later on): ArrayList<String> spinnerArray = new ArrayLis...

New programmatically added contact not visible in Contacts application

Hello, I'm developping an application in Android 1.6 (and can't use 2.0 or older). I add a new contact on my phone as following : ContentValues contentValues = new ContentValues(); contentValues.put(Contacts.People.NAME, name); Uri contactUri = this.getContentResolver().insert(Contacts.People.CONTENT_URI, contentValues); Afte...

[Android] Weird black line on top of list view

I am creating a layout with a ListView and at the very top of the list there is this weird black line that I can't seem to figure out how to get rid of! It's part of the ListView because it moves up and down as I size the ListView. Has anyone ran into this before? I couldn't get DDMS to take a screen capture for some reason so I too...

Trying to start a service on boot on Android

I've been trying to start a service when a device boots up on android, but I cannot get it to work. I've looked a number of links online but none of the code is working. Am I forgetting something? This is my code. Manifest <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> <receiver android:name=".StartSer...

How to deal with source code file auto-generated in the build process

Hi all, Please help I'm trying to build a third party library which uses auto-generated source code files. In normal case, this kind of files is generated by gnu build tools. My question is How can I tell the Android NDK build tools to generate and build this kind of files. Thanks in advance ...

How can I add spacing in RelativeLayout

Hi, I have a Relative Layout. Which has 2 buttons, side by side and it is right-aligned. So this is my layout xml file. My question is there are no spacing between the right-most button and the right border of the RelativeLayout and between the 2 buttons. How can I add that? I play with android:paddingRight, but nothing helps. Than...

How do I determine if Android can handle PDF

I know Android cannot handle PDFs natively. However, the Nexus One (and possibly other phones) come pre-installed with QuickOffice Viewer. How would I determine whether the user has a PDF viewer installed? Currently, the code to start the PDF download looks pretty simple: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(...