I am trying to get a Android hash key for Facebook for my app using this code in my Utility.java
class
but the getPackageManager()
method is flagged, is it an import problem or am i missing something?
I am trying to get a Android hash key for Facebook for my app using this code in my Utility.java
class
but the getPackageManager()
method is flagged, is it an import problem or am i missing something?
getPackageManager()
is a method of the Context
class. I'm not completely sure where you have the code above but it seems to be in some sort of a helper class. You need to pass a Context context
parameter to the method where your have this code defined and then change the line that uses getPackageManager()
to
context.getPackageManager()...