Displays a simple alert dialog.
Displays a simple alert dialog.
Although this builder displays some UI element, this builder can be called from any thread, because the method show()
handles threading internally.
This callback is run when the button is clicked. Does nothing by default.
When you register BroadcastReceiver with Context.registerReceiver() you have to unregister it to prevent memory leak.
When you register BroadcastReceiver with Context.registerReceiver() you have to unregister it to prevent memory leak. Trait UnregisterReceiver handles these chores for you. All you need to do is append the trait to your class.
class MyService extends SService with UnregisterReceiver { def func() { // ... registerReceiver(receiver, intentFilter) // Done! automatically unregistered at UnregisterReceiverService.onDestroy() } }
When you register BroadcastReceiver with Context.registerReceiver() you have to unregister it to prevent memory leak.
When you register BroadcastReceiver with Context.registerReceiver() you have to unregister it to prevent memory leak. Trait UnregisterReceiver handles these chores for you. All you need to do is append the trait to your class.
class MyService extends SService with UnregisterReceiver { def func() { // ... registerReceiver(receiver, intentFilter) // Done! automatically unregistered at UnregisterReceiverService.onDestroy() } }
Returns DefaultSharedPreferences object for given implicit context.
Returns DefaultSharedPreferences object for given implicit context.
Displays a toast message for a longer time.
Displays a toast message for a longer time. This method can be called from any threads.
Launches a new activity for a give uri.
Launches a new activity for a give uri. For example, opens a web browser for http protocols.
openUri("http://scaloid.org")
Plays a sound from a given Uri.
Plays a sound from a given Uri.
play("content://media/internal/audio/media/50")
Displays a dialog with spinner icon.
Displays a dialog with spinner icon. This method can be called from any threads.
Displays a toast message.
Displays a toast message. This method can be called from any threads.
Aggregate object for helpers.