receiver

Using an event receiver to update an item's 'Title' field.

Hi there. I have written an event receiver that is activated on the 'ItemAdded' event of a 'Pages' list. The code runs fine, but my issue is this - during the call to my Sub ItemAdded, I want to change the value of a field belonging to the current list item (in this case an aspx page). The idea is that I can configure the 'Title' field...

Is it possible to write an Android broadcast receiver that detects when the phone wakes up?

I want to figure out how to detect when the phone wakes up from being in the black screen mode and write a handler for that event. Is that possible? It seems like this would be something a Broadcast Receiver should handle? Or is there a better or more proper way? Thanks ...

How to use the same receiver for different widget

Hi, I wonder if it's possible to use the same provider (receiver) for 2 different widget (different sizes for example) I tried on my Manifest : <receiver android:name=".provider" android:label="@string/app_name_small"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <...

how to use intent from receiver android

hi ive got a working sms receiver but when i try to load another class using: Intent intent = new Intent(SMSReceiver.this, SMSNotifier.class); startActivityForResult(intent, 0); i get the error: The constructor Intent(SMSReceiver, Class<SMSNotifier>) is undefined for the first line and: The method startActivityForResult(Inten...

Prevent android app from showing up in switcher

Hey everyone, I have an app with an SMS receiver set up, but even if the sms receive function is turned off using the package manager, the app will go to the top of recent applications (when holding the home button) if a sms is received. How can I stop this behavior? Thanks for any help in advance. Cheers! ...

starting service without application

I have a call blocking application. It has 3 files: 1) class BlockMyCall extends BroadcastReceiver 2) class SimpleClass1 extends Service 3) PhoneBlock extends Activity I start "PhoneBlock " Activity to call Service "SimpleClass1 ", which eventually calls "BlockMyCall" intended to block outbound calls (by setting result to "null"). ...

Android from receiver to activity

I'm just getting into Android development, and I have a question about communicating between a receiver class and an activity class. I'm very new to JAVA and Android so I hope I don't sound too stupid. I'm developing an application where I intercept an SMS message and then based on various elements of that SMS I might delete it once it's...

Android SDK ExampleAppWidget does not respond to Time zone change

I am right now running ExampleAppWidget that comes with SDK. Now I could not get the timezone change to affect the widget. It seems the ExampleBroadcastReceiver never gets called when timezone is changed. Anybody was successful in running this widget? I can provide the sample code if needed. Thanks in advance. -Sang Shin javapassion...

Android: Detect another application has started playing audio

My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application. This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a...

broadcast receiver for missed call in android.

Hi, can anyone know what is the intent for missed call. Actually i want to send sms on missed call and incomming call in my application. ...

getting battery level at android widget

Hi, I wrote a widget for Android and I'm trying to get the battery level. I've tried using Intent batteryIntent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); but I get the error: "IntentReceiver components are not allowed to register to receive intents" Why? the ACTION_BATTERY_CHANGED is a sticky...

Android 2.0: Problem with registerReceiver (Bluetooth)

Hi, I want to use Bluetooth and therefore register a receiver in my activity: localBT = BluetoothAdapter.getDefaultAdapter(); IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); this.registerReceiver(mReceiver, filter); Unfortunately the application crashes in the third line. Here is the code of mReceiver: private ...

Android - broadcast

Hi all, I'm starting learning android development, so my knowledge is really limited at the moment. I'm trying playing with broadcasts, but I'm stuck and I can't understand what I'm doing wrong. What I'm trying to do it's just show a simple Toast from the broadcast receiver. The Intent is a custom intent defined in the manifest: <recei...

How to find if bluetooth transfer is complete programatically

Hello, How do I inform the application that that the BlueTooth file transfer is complete? The app will be designed in such a way that it relies on a broadcast message sent from the framework after the file transfer is complete. Regards, Webgenius ...

SMS receiver doesn't work on HTC Legend

I have an application where I am listening to all incoming SMS messages and if a message is send through my application, I need to do some task. Now the problem I am facing is with HTC legend running on Android 2.1 Update-1. My code works fine on emulator as well as Motorola Milestone (Android 2.1 Update-1), but same peice of code doesn'...

Error in receiving SMS using Broadcast receiver

Hello, I'm trying to receive SMS using broadcast receiver. MySMSReceiver : import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import android.util.Log; public class MySmsReceiver extends BroadcastReceiver { /** Tag s...

C++ DGRAM socket get the RECEIVER address.

In C++, how can I get the receiver address of the UDP packet which I have received using recvfrom. I know that it should be the same host on which I am receiving the packet, but I need to extract it from the received packet, in order to verify something. How can I do this? I found that one way of doing this is: int r = getsockopt(r...