Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update sample to match new ruboto split

  • Loading branch information...
commit 1934022d9c4836c31f20adfe4f16230483414430 1 parent 5a932c7
@rscottm authored
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
+
Please sign in to comment.
Something went wrong with that request. Please try again.