Broadcast Receiver as inner class in Android

Viewed 27007

In my code there is an inner class that extends BroadcastReceiver.

And I have added the following line to the AndroidManifest.xml:

<receiver android:name="OuterClass$InnerClass android:enabled="true"/>

But I am receiving the following error:

unable to instantiate receiver org.example.test.OuterClass$InnerClass

How can I solve this issue ?

6 Answers
Related