[Android] Any way I can emit events to JS from a foregound service? #252
                  
                    
                      marcofuentes05
                    
                  
                
                  started this conversation in
                Deep Dive
              
            Replies: 1 comment
-
| u can inherit the service from HeadlessJsTaskService, which has a reactContext. then u can emitDeviceEvent from it | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
So my app relies on a foreground service to provide data continuously to the JS part. With the old arch I had managed to start the foreground service -> fire up a broadcast to be picked by a receiver -> use the receiver's context to emit a event to JS. However I can't find a way to do this with the new arch since the API to emit events has changed.
Beta Was this translation helpful? Give feedback.
All reactions