Skip to content Skip to sidebar Skip to footer
Showing posts with the label Android Context

Calling A Method In A Fragment From A Separate Class

What's the best way to call a method inside a fragment from a different class? I passed the con… Read more Calling A Method In A Fragment From A Separate Class

Passing Context As Argument Of Dialogfragment

it's possible to pass a context variable to a DialogFragment? i've use this code inside dia… Read more Passing Context As Argument Of Dialogfragment

Android: Passing Context To Helper Class Results In Npe

I am creating an Android app and I am trying to use a SettingsManager class to read and write prefe… Read more Android: Passing Context To Helper Class Results In Npe

Android Applicationtestcase Using A Mockcontext

I'm new to Android testing and I'm trying to create an ApplicationTestCase using a MockCont… Read more Android Applicationtestcase Using A Mockcontext

Null Context In Setuservisiblehint

A message needs to be displayed to the user when a fragment in a ViewPager becomes visible. Current… Read more Null Context In Setuservisiblehint

Null Pointer Exception When Checking For Permission With Android.content.context.checkpermission

I need to check for permissions before querying the Android calendar for events. To do it, Android … Read more Null Pointer Exception When Checking For Permission With Android.content.context.checkpermission

Bluetooth Device Discovery In Android -- Startdiscovery()

Goal: Build an Android app that discovers the names and addresses of BT devices within range and su… Read more Bluetooth Device Discovery In Android -- Startdiscovery()

Getting Main Activity From Main Application

I have the following manifest. Solution 1: There is no way to retrieve the application's main … Read more Getting Main Activity From Main Application