Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NotificationCompat.Builder addAction missing?

According to the official documentation the NotificationCompat.Builder class should have method addAction, however I am unable to find it (I am getting "The method addAction(int, String, null) is undefined for the type NotificationCompat.Builder")

Has anyone figured out how to access this method?

like image 255
martinpelant Avatar asked Jul 26 '12 11:07

martinpelant


1 Answers

The missing methods have been added to Android support library r11. To add it to your project you must:

  1. Open the Android SDK Manager. Scroll down and find the Extras/Android Support Library Package. Check the revision column, if you have anything less then 11 you need to update your SDK first. In Eclipse that is done through the menu Help/Check for Updates.

  2. After you install the Android Support Library you must manually copy it into your project's libs folder. The jar is located at:

.

<your android sdk location>/extras/android/support/v13/android-support-v13.jar
like image 169
aeldron Avatar answered Sep 27 '22 20:09

aeldron