0
我知道它類似於這個問題How to get a list of installed media players,但我無法獲得已安裝播放器的列表。有人可以幫助我嗎?如何以編程方式獲取已安裝視頻播放器的列表?
Intent intent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.withAppendedPath(MediaStore.Video.Media.INTERNAL_CONTENT_URI,"1"); intent.setData(uri);
playerList = packageManager.queryIntentActivities(intent, 0);
普萊斯告訴我們一些代碼,你已經和你怎麼測試呢? – st0le
Intent intent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.withAppendedPath(MediaStore.Video.Media.INTERNAL_CONTENT_URI,「1」); \t \t \t \t \t intent.setData(uri); \t \t \t \t \t playerList = packageManager.queryIntentActivities(intent,0); – harish
我得到IllegalStateException在playerList = packageManager.queryIntentActivities(intent,0); – harish