Browse files

Update sample to match new ruboto split

  • Loading branch information...
1 parent 5a932c7 commit 1934022d9c4836c31f20adfe4f16230483414430 @rscottm committed Sep 29, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 assets/samples/sample_broadcast_receiver.rb
View
9 assets/samples/sample_broadcast_receiver.rb
@@ -1,6 +1,9 @@
-require 'ruboto'
+require 'ruboto/broadcast_receiver'
# will get called whenever the BroadcastReceiver receives an intent (whenever onReceive is called)
-$broadcast_receiver.handle_receive do |context, intent|
- Log.v "MYAPP", intent.getExtras.to_s
+RubotoBroadcastReceiver.new_with_callbacks do
+ def on_receive(context, intent)
+ Log.v "MYAPP", intent.getExtras.to_s
+ end
end
+

0 comments on commit 1934022

Please sign in to comment.