assets/samples/sample_broadcast_receiver.rb in ruboto-0.10.2 vs assets/samples/sample_broadcast_receiver.rb in ruboto-0.11.0.rc.0

- old
+ new

@@ -1,11 +1,11 @@ import android.util.Log class SampleBroadcastReceiver # 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 + def onReceive(context, intent) + Log.v 'SampleBroadcastReceiver', 'Broadcast received!' + Log.v 'SampleBroadcastReceiver', intent.getExtras.to_s rescue Exception Log.e "Exception processing broadcast: #{$!.message}\n#{$!.backtrace.join("\n")}" end end