android

android Linkify first occurence only

i am using Linkify with a custom TransformFilter. Is it possible to tell linkify to only match the first occurence of my pattern? ...

Android: How to put an Enum in a Bundle?

How do you add an Enum object to an Android Bundle? ...

How to prevent "sms sending"/texting on android?

Hi, I want to prevent "sms sending"/texting on android. There are some applications doing that but i don't know how? eg.: Textecution Stop Drunk Text 2.0 ...

Android: possible to unicast an intent?

In Android, is it possible to unicast an Intent to an Activity? The only options I see for sending intents is either to start an activity or issue a broadcast, but I only want a specific target to receive my Intent. ...

Android: Pass data from Activity to Service using an Intent

How do I get data within an Android Service that was passed from an invoking Activity? ...

Getting list of installed app's: Easy... But How to launch one of them?

Hello everybody! My first application will just be a kind of launcher that I would like to improve. This launcher will launch a custom Home that the user has installed. That's like the application "Home Switcher, but I would like to do that myself. So my first goal is to get all "Home" applications list: that's really easy and the cod...

location of camera picture on android

Do all android phones have a similar location to store camera pictures ? What is the role of EXTERNAL_CONTENT_URI vs. INTERNAL_CONTENT_URI ? If I want to have results from both data sources in one cursor query is that possible ? ...

Is it possible to find the location of another android phone?

I'm new to development for Android and I am curious if it is even possible to request and accurate location of another android device? For example, If I wanted to find where a friend is located and show it on my device in google maps. ...

Finding name of Android contact from number

In my app, I get the name of the person calling from the contacts database and read it out. A user contacted me about a number in the format 123-456-7890 which doesn't work. I've tested this myself and can't see why it wouldn't work. The full code I'm using is available here, but the relevant part is below: Cursor c = getContentResolve...

How to center an ImageView in a LinearLayout?

The following XML doesn't work to center an ImageView in a LinearLayout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:id="@+id/myimg" android:layout_...

Android Gallery Adapter with MultiTouch? Custom Gallery or Custom ImageView?

Hello, I would like to recreate the same type of app as Gallery3D but simpler: without the 3D animations and basically only keep GridView and Gallery widgets. I would also like to enable multi-touch zooming-dragging-scolling on the selected image and that's where I am struggling. I looked online for simple tutorials and I also looked at...

Android java.net.UnknownHostException: Host is unresolved (strategy question)

I have android code that uses a background process to routinely (e.g. hourly) connect to a content source on the web to check for updated content. As new users download the app and run it for the first time, it seems (and this is just a "seems at the moment) that in this first-run situation, because the DNS for our servers are not cached...

Custom Back Button Animation

The default animation when the Back button is pressed is a slide from left to right. I'd like to replace that with a custom animation. I'm currently thinking that some combination of onBackPressed() and overridePendingTransition will do the trick, but I haven't been able to get it working. ...

How to distribute an Android application (so that people cannot see the source)

I have some java code that I want to share with some classmates however I do not want to share the source with them. What is the standard method to provide someone with a Java executable that they can use but they cannot see the source. Not sure if this is relevant but the code that I will be giving them will be run on android. ...

Android GalleryView that contains scrollable views, e.g. ListView

Hi, I managed to implement a GalleryView, create a custom Adapter that returns a ListView for each item of the gallery but now the the problem: I while I can scroll the listview vertially, I can no longer scroll the GalleryView horizontally. What I am aiming at is a UI similar to the Google Weather/News application. While you can cl...

read an image I just wrote in android

So, largely for debugging purposes, I want to be able to write an image at arbitrary points in my code, and look at it later. I figured this would be easiest if I just wrote a my bitmap to a file and read it back later, but I cannot seem to figure out where to find the file after I write it, or how to open an image that is not in res/dra...

Android - I don't seem to have the ANIM folder or the MAINANIM.xml document... why is this?

I'm a noob... but no matter where I look in the res directory there is only main.xml and I am supposed to have res/anim/mainanim.xml and I don't. My code is here: http://stackoverflow.com/questions/3290290/please-help-me-with-frame-animaions-android-question Thanks to Cameron. I also keep getting in the java document, "id and anim ca...

java syntax question

Is this code instantiating a SectionedAdapter object and overriding getHeaderView in one line? SectionedAdapter tagSectionedAdapter=new SectionedAdapter() { protected View getHeaderView(String caption, int index, View convertView, ViewGroup parent) { Tex...

Why won't my listview display?

I am trying to show a list of files using an ArrayAdapter into a ListView. As best as I can tell, the following should work but it is just leaving the ListView empty. I am not using a ListActivity. Java setContentView(R.layout.files); findViewById(R.id.folder_use).setOnClickListener(this); ListView view = (ListView)findViewById(R.id.fi...

Why does the Camera server crash randomly?

I've implemented a basic picture taker for the Camera on my Android device. For some reason I randomly get these error messages: W/Camera ( 2097): Camera server died! W/Camera ( 2097): ICamera died E/Camera ( 2097): Error 100 Fortunately, Android has an OnError handler you can set on the Camera, which gets called when the server ...