Trait

org.scaloid.common

UnregisterReceiver

Related Doc: package common

Permalink

trait UnregisterReceiver extends ContextWrapper with Destroyable

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()
}
}

See also: https://github.com/pocorall/scaloid/wiki/Basics#trait-unregisterreceiver

Annotations
@deprecated
Deprecated

(Since version 4.0) Use ContentHelper.registerReceiver instead

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. UnregisterReceiver
  2. Destroyable
  3. ContextWrapper
  4. Context
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def attachBaseContext(arg0: Context): Unit

    Permalink
    Attributes
    protected[android.content]
    Definition Classes
    ContextWrapper
  6. def bindService(arg0: Intent, arg1: ServiceConnection, arg2: Int): Boolean

    Permalink
    Definition Classes
    ContextWrapper → Context
  7. def checkCallingOrSelfPermission(arg0: String): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  8. def checkCallingOrSelfUriPermission(arg0: Uri, arg1: Int): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  9. def checkCallingPermission(arg0: String): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  10. def checkCallingUriPermission(arg0: Uri, arg1: Int): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  11. def checkPermission(arg0: String, arg1: Int, arg2: Int): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  12. def checkUriPermission(arg0: Uri, arg1: String, arg2: String, arg3: Int, arg4: Int, arg5: Int): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  13. def checkUriPermission(arg0: Uri, arg1: Int, arg2: Int, arg3: Int): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  14. def clearWallpaper(): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( classOf[java.io.IOException] )
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def createPackageContext(arg0: String, arg1: Int): Context

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( ... )
  17. def databaseList(): Array[String]

    Permalink
    Definition Classes
    ContextWrapper → Context
  18. def deleteDatabase(arg0: String): Boolean

    Permalink
    Definition Classes
    ContextWrapper → Context
  19. def deleteFile(arg0: String): Boolean

    Permalink
    Definition Classes
    ContextWrapper → Context
  20. def enforceCallingOrSelfPermission(arg0: String, arg1: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  21. def enforceCallingOrSelfUriPermission(arg0: Uri, arg1: Int, arg2: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  22. def enforceCallingPermission(arg0: String, arg1: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  23. def enforceCallingUriPermission(arg0: Uri, arg1: Int, arg2: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  24. def enforcePermission(arg0: String, arg1: Int, arg2: Int, arg3: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  25. def enforceUriPermission(arg0: Uri, arg1: String, arg2: String, arg3: Int, arg4: Int, arg5: Int, arg6: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  26. def enforceUriPermission(arg0: Uri, arg1: Int, arg2: Int, arg3: Int, arg4: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  29. def fileList(): Array[String]

    Permalink
    Definition Classes
    ContextWrapper → Context
  30. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. def getApplicationContext(): Context

    Permalink
    Definition Classes
    ContextWrapper → Context
  32. def getApplicationInfo(): ApplicationInfo

    Permalink
    Definition Classes
    ContextWrapper → Context
  33. def getAssets(): AssetManager

    Permalink
    Definition Classes
    ContextWrapper → Context
  34. def getBaseContext(): Context

    Permalink
    Definition Classes
    ContextWrapper
  35. def getCacheDir(): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  36. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  37. def getClassLoader(): ClassLoader

    Permalink
    Definition Classes
    ContextWrapper → Context
  38. def getContentResolver(): ContentResolver

    Permalink
    Definition Classes
    ContextWrapper → Context
  39. def getDatabasePath(arg0: String): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  40. def getDir(arg0: String, arg1: Int): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  41. def getExternalCacheDir(): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  42. def getExternalFilesDir(arg0: String): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  43. def getFileStreamPath(arg0: String): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  44. def getFilesDir(): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  45. def getMainLooper(): Looper

    Permalink
    Definition Classes
    ContextWrapper → Context
  46. def getObbDir(): File

    Permalink
    Definition Classes
    ContextWrapper → Context
  47. def getPackageCodePath(): String

    Permalink
    Definition Classes
    ContextWrapper → Context
  48. def getPackageManager(): PackageManager

    Permalink
    Definition Classes
    ContextWrapper → Context
  49. def getPackageName(): String

    Permalink
    Definition Classes
    ContextWrapper → Context
  50. def getPackageResourcePath(): String

    Permalink
    Definition Classes
    ContextWrapper → Context
  51. def getResources(): Resources

    Permalink
    Definition Classes
    ContextWrapper → Context
  52. def getSharedPreferences(arg0: String, arg1: Int): SharedPreferences

    Permalink
    Definition Classes
    ContextWrapper → Context
  53. final def getString(arg0: Int, arg1: <repeated...>[AnyRef]): String

    Permalink
    Definition Classes
    Context
  54. final def getString(arg0: Int): String

    Permalink
    Definition Classes
    Context
  55. def getSystemService(arg0: String): AnyRef

    Permalink
    Definition Classes
    ContextWrapper → Context
  56. final def getText(arg0: Int): CharSequence

    Permalink
    Definition Classes
    Context
  57. def getTheme(): Theme

    Permalink
    Definition Classes
    ContextWrapper → Context
  58. def getWallpaper(): Drawable

    Permalink
    Definition Classes
    ContextWrapper → Context
  59. def getWallpaperDesiredMinimumHeight(): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  60. def getWallpaperDesiredMinimumWidth(): Int

    Permalink
    Definition Classes
    ContextWrapper → Context
  61. def grantUriPermission(arg0: String, arg1: Uri, arg2: Int): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  62. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  63. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  64. def isRestricted(): Boolean

    Permalink
    Definition Classes
    ContextWrapper → Context
  65. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  66. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  67. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  68. final def obtainStyledAttributes(arg0: AttributeSet, arg1: Array[Int], arg2: Int, arg3: Int): TypedArray

    Permalink
    Definition Classes
    Context
  69. final def obtainStyledAttributes(arg0: AttributeSet, arg1: Array[Int]): TypedArray

    Permalink
    Definition Classes
    Context
  70. final def obtainStyledAttributes(arg0: Int, arg1: Array[Int]): TypedArray

    Permalink
    Definition Classes
    Context
    Annotations
    @throws( ... )
  71. final def obtainStyledAttributes(arg0: Array[Int]): TypedArray

    Permalink
    Definition Classes
    Context
  72. def onDestroy(body: ⇒ Any): () ⇒ Any

    Permalink
    Definition Classes
    Destroyable
  73. var onDestroyBodies: Vector[() ⇒ Any]

    Permalink
    Attributes
    protected
    Definition Classes
    Destroyable
  74. def openFileInput(arg0: String): FileInputStream

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( ... )
  75. def openFileOutput(arg0: String, arg1: Int): FileOutputStream

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( ... )
  76. def openOrCreateDatabase(arg0: String, arg1: Int, arg2: CursorFactory, arg3: DatabaseErrorHandler): SQLiteDatabase

    Permalink
    Definition Classes
    ContextWrapper → Context
  77. def openOrCreateDatabase(arg0: String, arg1: Int, arg2: CursorFactory): SQLiteDatabase

    Permalink
    Definition Classes
    ContextWrapper → Context
  78. def peekWallpaper(): Drawable

    Permalink
    Definition Classes
    ContextWrapper → Context
  79. def registerComponentCallbacks(arg0: ComponentCallbacks): Unit

    Permalink
    Definition Classes
    Context
  80. def registerReceiver(receiver: BroadcastReceiver, filter: IntentFilter): Intent

    Permalink

    Internal implementation for (un)registering the receiver.

    Internal implementation for (un)registering the receiver. You do not need to call this method.

    Definition Classes
    UnregisterReceiver → ContextWrapper → Context
  81. def registerReceiver(arg0: BroadcastReceiver, arg1: IntentFilter, arg2: String, arg3: Handler): Intent

    Permalink
    Definition Classes
    ContextWrapper → Context
  82. def removeStickyBroadcast(arg0: Intent): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  83. def revokeUriPermission(arg0: Uri, arg1: Int): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  84. def sendBroadcast(arg0: Intent, arg1: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  85. def sendBroadcast(arg0: Intent): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  86. def sendOrderedBroadcast(arg0: Intent, arg1: String, arg2: BroadcastReceiver, arg3: Handler, arg4: Int, arg5: String, arg6: Bundle): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  87. def sendOrderedBroadcast(arg0: Intent, arg1: String): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  88. def sendStickyBroadcast(arg0: Intent): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  89. def sendStickyOrderedBroadcast(arg0: Intent, arg1: BroadcastReceiver, arg2: Handler, arg3: Int, arg4: String, arg5: Bundle): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  90. def setTheme(arg0: Int): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  91. def setWallpaper(arg0: InputStream): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( classOf[java.io.IOException] )
  92. def setWallpaper(arg0: Bitmap): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( classOf[java.io.IOException] )
  93. def startActivities(arg0: Array[Intent], arg1: Bundle): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  94. def startActivities(arg0: Array[Intent]): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  95. def startActivity(arg0: Intent, arg1: Bundle): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  96. def startActivity(arg0: Intent): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  97. def startInstrumentation(arg0: ComponentName, arg1: String, arg2: Bundle): Boolean

    Permalink
    Definition Classes
    ContextWrapper → Context
  98. def startIntentSender(arg0: IntentSender, arg1: Intent, arg2: Int, arg3: Int, arg4: Int, arg5: Bundle): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( ... )
  99. def startIntentSender(arg0: IntentSender, arg1: Intent, arg2: Int, arg3: Int, arg4: Int): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
    Annotations
    @throws( ... )
  100. def startService(arg0: Intent): ComponentName

    Permalink
    Definition Classes
    ContextWrapper → Context
  101. def stopService(arg0: Intent): Boolean

    Permalink
    Definition Classes
    ContextWrapper → Context
  102. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  103. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  104. def unbindService(arg0: ServiceConnection): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  105. def unregisterComponentCallbacks(arg0: ComponentCallbacks): Unit

    Permalink
    Definition Classes
    Context
  106. def unregisterReceiver(arg0: BroadcastReceiver): Unit

    Permalink
    Definition Classes
    ContextWrapper → Context
  107. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  109. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Destroyable

Inherited from ContextWrapper

Inherited from Context

Inherited from AnyRef

Inherited from Any

Ungrouped