Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create/replace Android.mk file to instantiate Notification.TvExtender()

My intention is to instantiate a Notification.TvExtender() which is annotated as @SystemApi as you can see in Android_SDK\sources\android-30\android\app\Notification.java see here

According to this medium article, I would need to modify the Android.mk file. Since I don't have this file in my project and I also don't use NDK, how can I create this file?

I manually created the file in a jni/ folder, but it won't appear in the project. What do I need to do?

like image 398
Edna Krabappel Avatar asked Dec 13 '25 02:12

Edna Krabappel


1 Answers

To use @SystemApi, you need to build you apk using full AOSP sources.

To do this, you can follow documentation here : https://source.android.com/setup/start?hl=en

You need also to create Android.mk or Android.bp to build your application using private api. (ex : https://android.googlesource.com/platform/packages/apps/TvSettings/+/refs/heads/pie-release/Settings/)

like image 54
Guillaume P Avatar answered Dec 14 '25 14:12

Guillaume P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!