android

[Android] How to search and Highlight Text within an EditText

I've searched high and low for something that seems to be a simple task. Forgive me, I am coming to Android from other programming languages and am new to this platform and Java. What I want to do is create a dialog pop-up where a user enters text to search for and the code would take that text and search for it within all the text in ...

Need help implementing an Android service that does http long polling

I've seen persistent TCP connections implemented (http://devtcg.blogspot.com/2009/01/push-services-implementing-persistent.html), but my needs are a little different. I need an Android service that always runs in the background and keeps a long polling connection to an HTTP server and communicates with it using JSON over POST method. D...

Android audio manager method causing a force close

Hi All, New to this and a bit confused as to why calling the following method creates a force close: AudioManager myaudiomanager; public void toggleSilent() { myaudiomanager.setRingerMode(AudioManager.RINGER_MODE_SILENT); } I don't see any blatant errors and I have added permissions to the manifest regarding the audio manager. An...

Content Provider

Created a profile using content provider. After running it correctly, added 3 fields to the table. But now its not working corrrectly.It shows an error like "android.content.res.Resources$NotFoundException: String resource ID #0x4d2".Any solution? ...

Wondering how to get mp3 information on android emulator

First of all I would like to know if it is possible to extract ID3 tag information from media files on my Android emulator. I am new to Android development and have decided to build a tag editor for it. If it is possible, I would like to know how to go about extracting the id3 tags from the file that I have selected. ...

Threading in Android

I am currently developing Android app, it needs download content from internet. I use thread to do that and then call runOnUiThread method to update GUI. I placed a refresh menu on it, if user tried to refresh the content, the download thread will be created and started. The problem is that how can I control the thread order, I need t...

setting an animation to requestFocus() in Android?

I have an android application in which once when I call requestFocus() to a view I want to go to that view in an animated way (for eg: in an accelerated way, or a slow animation). All my views are in a ScrollView. ...

need help in sms reader

i intend to develop an app which would speak to the user the message he desires in the inbox. I have successfully created an app where there is a text box and when the user finishes typing in it and presses a speak button, he can hear what he has written, now how do i extend this to the desired app? please could someone please guide me o...

Orange rectangle around links in WebView

I have a web view that is loaded with an HTML that contains links. when I switch to another activity (say to another tab in a tab activity) and then switching back to it, the link is surrounded with an orange rectangle. also happens in the GoogleAdView which really makes it impossible to view. ...

onReceive of Android Home Screen Widget not working when recreating the widget

whenever I recreate the home screen widget on my phone, the onReceive() method is not called. the problem would be that it doesn't respond to Button press that I assign which its function resides in the onReceive method.. The issue does not reside on the emulator but when I tested it with my phone, it doesnt respond to it. What would...

Android: how to cancel a request of Location update with intent?

I registered a PendingIntent to requestLocationUpdates(provider, minTime, minDistance, PendingIntent). But when my broadcast receiver receives this intend, how do I remove this request with removeUpdates(PendingIntent)? The receiver doesn't hold a reference to the original PendingIntent. ...

Resources & Frameworks for mobile development (iphone,android) using HTML5

I am looking for resources to develop HTML5 apps for iphone primarily. Are their frameworks and tools that I can use to get started? I am looking for: Javascript frameworks that help with UI layout Touch based controls for phones Articles on iphone development, best practices, etc. I searched stackoverflow and was not able to come up...

A error message from log when running my tab program.

06-13 08:58:24.114: ERROR/AndroidRuntime(627): java.lang.RuntimeException: Unable to start activity ComponentInfo{irdc.tabuse/irdc.tabuse.TabUse}: java.lang.RuntimeException: Could not create tab content because could not find view with id 2131034112 I don't understand what it means. Here is the code: package irdc.test2; import andro...

Opening email attachments in Android

I try to open a specific email attachment type with my activity, the attachment itself is a plain text windows style ini file with the extension *.os. In the email this file is attached as "application/octet-stream". I tried the following intent-filter to catch the attachment with my activity: <intent-filter> <actio...

Store password temporarily in memory

Hello, I'm looking for a way in an Android application to store a password within the memory as long as the application is running (cf. different activities). I was first thinking about the SharedPreferences, but then it's saved in the flash memory, which isn't that good for a password, I guess. I'm unsure, what's the best way. What wo...

Problem with TabHost UI layout.

What I'm trying to do is create a layout like this: +--------+ Search |EditText| [Button] +--------+ +---------+ |Tab 1 |---------+ | |Tab 2 | |---------+---------+-----------------+ | ListView Item 1 | | ListView Item 2 | | ListView Item 3 | | Lis...

Disconnect a bluetooth socket in Android

Hi, I'm developing a program in which, from an Android Phone, I have to connect as a client to a Bluetooth medical sensor. I'm using the official Bluetooth API and no problem during connection (SPP profile), but when I end the socket, the sensor is still connected to my phone (although I have close the connection). Are there any way to...

Google Calendar doubt?

I am new to android. I need to add events to Google calendar from my application. How to integrate with google calendar? What are the jar files are needed? Is it needed to enable any gmail setting? I need some help .Can anyone help me to solve this?? ...

How to catch a "Done" key press from the soft keyboard

Hi, how do I catch specific key events from the soft keyboard? specifically I'm interested in the "Done" key. thanks, Ori ...

How can change my TabHost ?

I have a tabhost, e.g: final TabHost tabs = getTabHost(); tabs.setup(); TabHost.TabSpec spec = null; spec = tabs.newTabSpec("search"); spec.setContent(new Intent(this, Search.class)); spec.setIndicator("search"); tabs.addTab(spec); in this tabhost is a Intent,and in the activity must chan...