Sha256: 7c1bf478a217a4adc9bd32ffa075c5c93e9cc9a4e369771755073376f2520398
Contents?: true
Size: 525 Bytes
Versions: 1
Compression:
Stored size: 525 Bytes
Contents
require 'ruboto/broadcast_receiver' import android.util.Log class SampleBroadcastReceiver include Ruboto::BroadcastReceiver # will get called whenever the BroadcastReceiver receives an intent (whenever onReceive is called) def on_receive(context, intent) Log.v "SampleBroadcastReceiver", 'Broadcast received!' Log.v "SampleBroadcastReceiver", intent.getExtras.to_s context.run_on_ui_thread{$activity.title = 'Broadcast received!'} Log.v "SampleBroadcastReceiver", 'Broadcast processed OK!' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruboto-0.7.0 | assets/samples/sample_broadcast_receiver.rb |