草庐IT

media-types

全部标签

java - Android 8.1 带通知 : Use of stream types is deprecated

只要我的服务正常运行,我的状态栏中就会保留FLAG_ONGOING_EVENT通知,并且它每秒都会更新时间。Android8之后,我添加了NotificationChannel8和8+设备都运行良好,但是8+设备每秒都在我的logcat中填充以下警告,这非常烦人:04-1020:36:34.04013838-13838/xxx.xxxx.xxxxW/Notification:UseofstreamtypesisdeprecatedforoperationsotherthanvolumecontrolSeethedocumentationofsetSound()forwhattousei

android - 播放流时如何避免 Android Media Player 中的 15 秒延迟/缓存

我正在实现一个播放来自远程机器的流的媒体播放器。通过我的应用程序,我可以控制远程机器(例如寻求第二个)。像魅力一样工作,但是:AndroidMediaPlayer缓冲了一些疯狂的10-15秒(!!),这意味着每次点击('seek')需要10-15秒才能生效,即使距离新的点击不到一秒数据到达。我的问题:有没有办法控制(限制)缓存?或者我只是做错了什么?只有我有这个问题吗?我的代码很简单:player=newMediaPlayer()player.setDataSource(url);player.setOnPreparedListener(newOnPreparedListener(){

java - Android 谷歌地图 v2、MAP_TYPE_NONE 和黑色方 block

我一直在为Googlemapv2和自定义图block而苦苦挣扎。它工作正常,但我们经常在Googlemap中看到黑色方block,它们非常具有破坏性。我可以通过这样做非常简单地重现该问题:mapFragment=newMapFragment(){@OverridepublicvoidonActivityCreated(BundlesavedInstanceState){super.onActivityCreated(savedInstanceState);mapFragment.getMap().setMapType(GoogleMap.MAP_TYPE_NONE);}};Fragme

java - 在 Firebase GenericTypeIndicator 中使用泛型类型时为 "Unknown type encountered"

我尝试创建具有通用类型的类,我在其中创建函数来读取实体列表。我知道我有两种方法可以做到这一点:(#1)通过循环读取每个实体或(#2)直接创建实体映射。第二种方法看起来更有效,但不幸的是GenericTypeIndicator不适用于泛型类型-它返回IllegalStateException:Unknowntypeencountered:T当我在代码中使用它时:MapentityMap=dataSnapshot.getValue(newGenericTypeIndicator>(){});所以:有什么方法可以将通用类型的实体直接读取到map中吗?(#2)或者只是在循环中读取实体时它们在性

java - 错误 : Could not get unknown property 'config' for object of type com. google.gms.googleservices.GoogleServicesPlugin$GoogleServicesPluginConfig

这个问题在这里已经有了答案:Couldnotgetunknownproperty'config'fortypecom.google.gms.googleservices.GoogleServicesPlugin$GoogleServicesPluginConfig(2个答案)关闭3年前。在我将我的googleplay服务依赖项升级到之后classpath'com.google.gms:google-services:4.2.0'至classpath'com.google.gms:google-services:4.3.0'

android - java.lang.RuntimeException : start failed at android. media.MediaRecorder.start( native 方法)

我正在处理通话记录。当我开始录制一个电话时,不幸的是它停止了。&它给出错误MediaRecorder启动失败-2147483648。请告诉我我的代码有什么问题?这是我的代码。publicclassincomingcallextendsBroadcastReceiver{Contextc;MediaRecorderrecorder;publicincomingcall(){}@OverridepublicvoidonReceive(Contextcontext,Intentintent){c=context;try{PhoneStateChangeListenerpscl=newPhon

android - 如何修复这个 : on logcat -->> error loading/system/media/audio/ui/Effect_Tick. ogg?

我有一个问题:errorloading/system/media/audio/ui/Effect_Tick.ogg当我点击navdraw图标时显示。任何人都可以帮助我??这是logcat上的错误:04-2001:42:11.240:E/SoundPool(639):errorloading/system/media/audio/ui/Effect_Tick.ogg04-2001:42:11.251:E/SoundPool(639):errorloading/system/media/audio/ui/Effect_Tick.ogg04-2001:42:11.251:E/SoundPoo

android - MEDIA_TYPE_IMAGE 无法识别

我在使用android开发人员的相机资源时遇到问题,这是我的代码://createIntenttotakeapictureandreturncontroltothecallingapplicationIntentintent=newIntent(MediaStore.ACTION_IMAGE_CAPTURE);fileUri=getOutputMediaFileUri(MEDIA_TYPE_IMAGE);//createafiletosavetheimageintent.putExtra(MediaStore.EXTRA_OUTPUT,fileUri);//settheimagefil

java - Firebase 数据库异常 : Failed to convert value of type java. lang.Long 到字符串

com.google.firebase.database.DatabaseException:Failedtoconvertvalueoftypejava.lang.LongtoString是我在按照文档尝试将数据检索到对象以供使用时不断遇到的错误。这是我的对象模型publicclassUser{privateStringtour_director_key;privateStringlast_name;privateStringlocation_latitude;privateStringtour_id;privateStringphoto;privateStringtour_dire

ES索引创建报错cannot be changed from type

使用ES一段时间了。突然有一天线上索引创建报错。到9月份了。按照月份生成日期时报错如下:ElasticsearchStatusException[Elasticsearchexception[type=illegal_argument_exception,reason=mapper[xxx]cannotbechangedfromtype[integer]to[long]]]查看了git历史日志,并没有发现修改字段类型的痕迹。于是我本地运行代码,多线程触发,模拟同时创建索引。果然真的就报出来上面的错误。1、问题复现经过反复多次模拟,报错类型总共出现如下几种:1、索引类字段类型转换出错Except