Questions tagged [receiver]

An object that receives some messages.

An object that receives some messages.

389 questions
4
votes
2 answers

Why is my Receiver for charging status always returning false?

I'm trying to detect when a user plugs (or unplugs) in their device to charge. In my receiver, where I determine whether it is plugged in or not, I always get a "false" reading on the status. Here is my code: (In the manifest):
hellaandrew
  • 823
  • 11
  • 23
4
votes
3 answers

onReceive called many times

I have a service that get data from an other application. When I get date I send message to broadCast in order to refresh the UI. The onReceive method is called many times and data displayed multiple times. this is my…
Wafae
  • 177
  • 3
  • 12
4
votes
2 answers

Detect day change event in broadcast receiver in android

I want to implement a feature in android app which execute a particular code when ever there is a date change(at 00:00AM) even when my app is not running.
Saurabh Gohil
  • 75
  • 1
  • 1
  • 9
4
votes
2 answers

Android BroadcastReceiver: run it on default process or in a new one?

I have an application with two Broadcast Receivers, one of them to receive data and the other one to send it. I've seen that they have an attribute android:process to make them run on the application's default process or in another one. In the…
PX Developer
  • 8,065
  • 7
  • 42
  • 66
4
votes
1 answer

In-app billing receiver permission

Background I know the receiver in the Dungeons manifest (the in app billing example, for those who don't know) does not include a permission element, yet Lint warns me: "Exported receiver does not require permission (...) Without this, any…
davidcesarino
  • 16,160
  • 16
  • 68
  • 109
3
votes
1 answer

Getting receiver information from backtrace

From an error backtrace $!.backtrace, you can extract the method names for each step. I want to further extract the receiver of each method call. I am sure there is a way to do this because I saw this gem that has this function. The gem mentioned…
sawa
  • 165,429
  • 45
  • 277
  • 381
3
votes
1 answer

IllegalArgumentException: Receiver not registered

I am trying to display banner ads..on the first screen as well as on the second screen... when i try to go back to first screen through intent i am getting below error: 11-03 12:01:16.464: ERROR/AndroidRuntime(1971):…
Arun
  • 1,658
  • 1
  • 14
  • 21
3
votes
1 answer

In Kotlin, how can I bind an extension method to work within a receiver scope function

This feels like some kind of inconsistency because it works with a standalone function, but not with a class/interface method: class TestClass { val foo = "bar" } fun testScope(scope: TestClass.() -> Any) { val test = TestClass() …
Zak Henry
  • 2,075
  • 2
  • 25
  • 36
3
votes
1 answer

How to use Android AlarmManager in Fragment in Kotlin?

I can't seem to get the AlarmManager to work inside a Fragment. My receiver's onReceive() method never gets executed. I assume that I might use context in a wrong way but then again I also couldn't get it to work inside an Activity. I've also…
Jan
  • 33
  • 1
  • 3
3
votes
1 answer

Python 3.7 smtplib sendmail sends only to first recipient in list

I've gone through many SO posts and smtplib documentation, everything seems to be correct, but mail is sent to only first recipient in the list Note: I'm using Python3.7, I've tried from Python 2.6 also, In below case mail is getting delivered only…
Rohit Nimmala
  • 1,459
  • 10
  • 28
3
votes
1 answer

udpclient receives broadcast only locally (c#, Unity)

I want to receive a UDP message which was broadcasted to 255.255.255.255 with a UdpClient within Unity. But whatever combination of settings I try, it only receives a message, if it was sent from localhost. I have tried fitted example code from…
IARI
  • 1,217
  • 1
  • 18
  • 35
3
votes
0 answers

How to send custom headers or authenticate Chromecast

I'm developing a video application with HLS streams. These streams can only be played if I send in the request https custom headers. On iOS I do like this: NSMutableDictionary* headers = [NSMutableDictionary dictionary]; [headers…
3
votes
1 answer

django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. file init

django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. Exception appeared when I added: import signals in init.py file (apps/application/init.py) from models import Review in signals.py file (apps/application/signals.py) I want to…
3
votes
1 answer

Receive midi input with javax.sound.midi

I would like to have a program that could do something when it gets a midi input. For instance when I click button 1 on my controller it should print "You clicked btn 1" and when I click button 2 it should print "You clicked btn 2". I tried using…
Gustav
  • 93
  • 9
3
votes
1 answer

Is it possible to avoid function names at all in Kotlin DSL?

In Kotlin DSL example they use plus signs to implement raw content inserting: html { head { title {+"XML encoding with Kotlin"} } // ... } Is it possible to define "nameless" functions in receiver to be able to write html { …
Dims
  • 47,675
  • 117
  • 331
  • 600
1 2
3
25 26