Firstly, Call
abstract class, so you cannot instantiate it directly. You must create a subclass like MyCall extends Call
, which overrides any abstract methods in Call.
Getting a NullPointerException
means that everything you pass as the argument to getCallFailedString()
not been initialized. Therefore, creating your subclass of Call, you must create an instance of it, and then pass it to your method, for example:
class MyCall extends Call {
Wherever you call getCallFailedString()
, then you need something above it, for example:
Call cal = new MyCall(); Activity activity = new MyActivity(); activity.getCallFailedString(cal);
Yuushi
source share