1

here is the project code: https://github.com/harpreetahluwalia/SmartMediaPlayer

It's working fine in android 7 and android 8 but not working in android 9 or higher

It's giving some warnings like these:

uses or overrides a deprecated API.
Recompile with -Xlint:deprecation for details

Any help would be really appreciated!

jose praveen
  • 1,298
  • 2
  • 10
  • 17

1 Answers1

0

The problem you are facing is that you are using a function which is deprecated on API 24 (Android 7.0).

In VideoFolder.java file line 39,

getSupportActionBar().setTitle(Html.fromHtml("<font color='#ffffff'>Smart Video Player </font>"));

You are using Html.fromHtml() which is deprecated.

Use HtmlCompat instead. Please do refer this answer:

https://stackoverflow.com/a/37905107/1770409

Tip on finding deprecated warnings and other issues,

In Android Studio, go to Analyze -> Inspect Code then select the scope you want to inspect. It will show all the warnings you have to pay attention for.