简体   繁体   中英

Will Android Auto Work With MediaBrowserService?

The documentation for getting your app to work with Android auto direct users to use MediaBrowserServiceCompat. Because my app doesn't support pre-APIv21 I didn't use the compat version I used MediaBrowserService.

My main question is: can not using MediaBrowserServiceCompat (over using the MediaBrowserService) cause problems getting apps to work with Android auto?

My other question is: is there a reason to use the compat libraries other than supporting legacy devices (pre APIv21)?

No, it should not be a problem. But one thing to be noted here is Compat library is not a way to support exactly pre APIv21 devices, instead according to android documentation: "it is a standard way to provide newer features on earlier versions of Android or gracefully fall back to equivalent functionality". To understand it, suppose after some years when android P/Q/R gets released with some new features that previous android versions didn't had, so to have support for these features on those api devices an equivalent compat class in compat library will be provided. So you can't say that compat libraries are for exactly pre APIv21. Any way if you are not targeting older devices then you can ignore compat library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM