网站建设完成后期维护网站的seo

news/2025/9/23 23:17:20/文章来源:
网站建设完成后期维护,网站的seo,自动跳转入口免费,长春软件公司排名前言:本文会介绍 Android 与 iOS 两个平台的处理方式 一、Android高版本在应用退到后台时,系统为了省电会限制应用的后台活动,因此我们需要开启一个前台服务,在前台服务中发送常驻任务栏通知,以此来保证App 退到后台时不会被限制活动. 前台服务代码如下: package com.notify…前言:本文会介绍 Android 与 iOS 两个平台的处理方式 一、Android高版本在应用退到后台时,系统为了省电会限制应用的后台活动,因此我们需要开启一个前台服务,在前台服务中发送常驻任务栏通知,以此来保证App 退到后台时不会被限制活动. 前台服务代码如下: package com.notify.test.service;import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.IBinder;import com.notify.test.R;import androidx.annotation.Nullable;/*** desc:解决声网音视频锁屏后听不到声音的问题* (可以配合Application.ActivityLifecycleCallbacks使用)** Created by booyoung* on 2023/9/8 14:46*/ public class KeepAppLifeService extends Service {NullableOverridepublic IBinder onBind(Intent intent) {return null;}private final String notificationId app_keep_live;private final String notificationName audio_and_video_call;Overridepublic void onCreate() {super.onCreate();NotificationManager notificationManager (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);//创建NotificationChannelif (Build.VERSION.SDK_INT Build.VERSION_CODES.O) {NotificationChannel channel new NotificationChannel(notificationId, notificationName, NotificationManager.IMPORTANCE_HIGH);//不震动channel.enableVibration(false);//静音channel.setSound(null, null);notificationManager.createNotificationChannel(channel);}startForeground(1, getNotification());}Overridepublic int onStartCommand(Intent intent, int flags, int startId) {return super.onStartCommand(intent, flags, startId);}Overridepublic void onDestroy() {super.onDestroy();}Overridepublic void onTaskRemoved(Intent rootIntent) {super.onTaskRemoved(rootIntent);//stop servicethis.stopSelf();}/*** 获取通知(Android8.0后需要)* return*/private Notification getNotification() {Notification.Builder builder new Notification.Builder(this).setSmallIcon(R.mipmap.logo).setOngoing(true).setContentTitle(App名称).setContentIntent(getIntent()).setContentText(音视频通话中,轻击以继续);if (Build.VERSION.SDK_INT Build.VERSION_CODES.O) {builder.setChannelId(notificationId);}return builder.build();}/*** 点击后,直接打开app* return*/private PendingIntent getIntent() {//获取启动ActivityIntent msgIntent getApplicationContext().getPackageManager().getLaunchIntentForPackage(getPackageName());PendingIntent pendingIntent PendingIntent.getActivity(getApplicationContext(),1,msgIntent,PendingIntent.FLAG_UPDATE_CURRENT);return pendingIntent;} } 不要忘记在AndroidManifest.xml中声明Service哈 service android:name.service.KeepAppLifeServiceandroid:enabledtrueandroid:exportedfalseandroid:stopWithTasktrue / 然后接下来就需要在声网音视频接通与挂断分别开启与关闭前台服务了,此处回调使用了EaseCallKit的写法,如果没使用EaseCallKit UI库的可以自己在EaseVideoCallActivity中的接通与挂断回调开启与关闭前台服务 public void addCallkitListener() {callKitListener new EaseCallKitListener() {Overridepublic void onInviteUsers(Context context, String userId[], JSONObject ext) {}Overridepublic void onEndCallWithReason(EaseCallType callType, String channelName, EaseCallEndReason reason, long callTime) {EMLog.d(TAG, onEndCallWithReason (callType ! null ? callType.name() : callType is null ) reason: reason time: callTime);SimpleDateFormat formatter new SimpleDateFormat(mm:ss);formatter.setTimeZone(TimeZone.getTimeZone(UTC));String callString 通话时长;callString formatter.format(callTime);Toast.makeText(MainActivity.this, callString, Toast.LENGTH_SHORT).show();//关闭任务栏通知stopBarNotify();}Overridepublic void onGenerateToken(String userId, String channelName, String appKey, EaseCallKitTokenCallback callback) {EMLog.d(TAG, onGenerateToken userId: userId channelName: channelName appKey: appKey);//获取声网TokengetAgoraToken(userId, channelName, callback);//创建服务开启任务栏通知(此处为了模拟,最好将openBarNotify()方法放在获取成功声网token后调用)openBarNotify();}Overridepublic void onReceivedCall(EaseCallType callType, String fromUserId, JSONObject ext) {EMLog.d(TAG, onRecivedCall callType.name() fromUserId: fromUserId);}Overridepublic void onCallError(EaseCallKit.EaseCallError type, int errorCode, String description) {EMLog.d(TAG, onCallError);}Overridepublic void onInViteCallMessageSent() { // LiveDataBus.get().with(DemoConstant.MESSAGE_CHANGE_CHANGE).postValue(new EaseEvent(DemoConstant.MESSAGE_CHANGE_CHANGE, EaseEvent.TYPE.MESSAGE));}Overridepublic void onRemoteUserJoinChannel(String channelName, String userName, int uid, EaseGetUserAccountCallback callback) {}};EaseCallKit.getInstance().setCallKitListener(callKitListener);}private void openBarNotify(){keepAppIntent new Intent(this, KeepAppLifeService.class);if (Build.VERSION.SDK_INT Build.VERSION_CODES.O) {//android8.0以上通过startForegroundService启动servicestartForegroundService(keepAppIntent);} else {startService(keepAppIntent);}}private void stopBarNotify(){if (keepAppIntent ! null) {stopService(keepAppIntent);}} 二、iOS想在后台时播放声音,需要在添加App plays audio or streams audio/video using AirPlay权限 1.Info.plist里找到选项Required background modes 添加App plays audio or streams audio/video using AirPlay 2.在SigningCapabilities - Background Modes - 勾选 Audio,AirPlay, and Picture in Picture 3.在AppDelegate.m中实现applicationDidEnterBackground代理方法 - (void)applicationDidEnterBackground:(UIApplication *)application{//环信已实现了进入后台的处理逻辑,如果要自己处理,可以参考下边注释代码[[EMClient sharedClient] applicationDidEnterBackground:application]; }#if Ease_UIKIT // - (void)applicationDidEnterBackground:(NSNotification *)notification { // if (!self.config.shouldRemoveExpiredDataWhenEnterBackground) { // return; // } // Class UIApplicationClass NSClassFromString(UIApplication); // if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:selector(sharedApplication)]) { // return; // } // UIApplication *application [UIApplication performSelector:selector(sharedApplication)]; // __block UIBackgroundTaskIdentifier bgTask [application beginBackgroundTaskWithExpirationHandler:^{ // // Clean up any unfinished task business by marking where you // // stopped or ending the task outright. // [application endBackgroundTask:bgTask]; // bgTask UIBackgroundTaskInvalid; // }]; // // // Start the long-running task and return immediately. // [self deleteOldFilesWithCompletionBlock:^{ // [application endBackgroundTask:bgTask]; // bgTask UIBackgroundTaskInvalid; // }]; // } #endif 4.因为App plays audio or streams audio/video using AirPlay权限只能是音乐播放类与具有音视频通话场景的App使用,所以审核的时候需要在备注描述清楚使用该场景的方式.如果审核失败,可以录制视频在附件上传,然后等待苹果重新审核即可.如果录制的视频没有问题,那就坐等着审核通过了,good luck!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/914201.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

长春市长春网站建设高端型网站制作

什么是 resolvectl “resolvectl” 是一个用于管理系统 DNS 解析配置的命令行工具。它是 systemd-resolved 服务的一部分,该服务是在许多基于 Systemd 的 Linux 发行版中用于管理网络配置和 DNS 解析的系统服务。 通过 resolvectl 命令,可以查看当前系…

建设银行官方网站首页入口购物网站排名大全

题目:输入一个整数数组,判断该数组是不是某二元查找树的后序遍历的结果。 如果是返回true,否则返回false。 例如输入5、7、6、9、11、10、8,由于这一整数序列是如下树的后序遍历结果: 8 / \ 6 10 / \ / \ 5 7 9…

平台类网站有哪些广州市网站开发

-- 日、时、分、秒,这是计时的单位,惜时就应该惜日、惜时、惜分、惜秒。 用 Java 来读取 Excel 文件,检查每一行中的 URL,并将不符合条件的行标记为红色。以下是一个简单的示例,使用 Apache POI 进行 Excel 操作&#…

02020405 EF Core基础05-EF Core反向工程、EF Core和ADO.NET Core的联系、EF Core无法做到的事情

02020405 EF Core基础05-EF Core反向工程、EF Core和ADO.NET Core的联系、EF Core无法做到的事情 1. 数据库设计的三种形式(视频3-9)DB First → 先在数据库中将数据表建好了,然后再反向生成实体类。简单,但是不适…

02020406 EF Core基础06-EF Core生成的SQL

02020406 EF Core基础06-EF Core生成的SQL 1. 通过代码查看EF Core的SQL语句(视频3-12) 1.1 方法1:标准日志 // 标准日志用法示例 public static readonly ILoggerFactory MyLoggerFactory= LoggerFactory.Create(b…

北京网站建设工作南京专业做网站的公司有哪些

面试中的收获: 优点: 1. 设计用例考虑较为全面。 2. 自动化,性能都有涉猎,但不深入。 3. 对业务理解较深入。 缺点: 1. 接口自动化停留在初级阶段。 2. UI自动化了解较少。 3. 性能压测缺少数据清洗等步骤。 4. 算法还…

菲斯曼售后服务中心贵港seo关键词整站优化

拦截器-interceptor 在现代的一些前端框架上,拦截器基本上是很基础但很重要的一环,比如Angular原生就支持拦截器配置,VUE的Axios模块也给我们提供了拦截器配置,那么拦截器到底是什么,它有什么用?拦截器能帮…

网站打不开服务器错误建手机网站多少钱

给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的每个数字在每个组合中只能使用一次。 说明: 所有数字(包括目标数)都是正整数。解集不能包含重复的组合。 …

温州专业网站建设公司wordpress的链接怎么设置

把这个项目的文档迁入到SVN Server上的库中 【1】首先右键点击projectAdmin目录,这时候的右键菜单例如以下图看到的:选择copy URL toCLipboard,就是复制统一资源定位符(URL)到剪贴板中 https://KJ-AP01.中国.corpnet:8443/svn/pro…

中山建设监理有限公司 网站扁平化网站首页

随着数字化时代的来临,装修小程序成为提升服务质量和效率的关键工具。装修小程序旨在为装修公司提供数字化赋能、提高客户满意度的智慧装修平台。通过装修小程序,装修公司能够与客户进行在线沟通、展示设计方案、提高服务满意度等操作。 装修小程序的好处…

服装商城网站模板wordpress极简模板

前言 整理这个官方翻译的系列,原因是网上大部分的 tomcat 版本比较旧,此版本为 v11 最新的版本。 开源项目 从零手写实现 tomcat minicat 别称【嗅虎】心有猛虎,轻嗅蔷薇。 系列文章 web server apache tomcat11-01-官方文档入门介绍 web…

网站编程培训班开发微信商城平台

串的概念:串(字符串):是由 0 个或多个字符组成的有限序列。 通常记为:s ‘ a1 a2 a3 … ai …an ’ ( n≥0 )。 串的逻辑结构和线性表极为相似。 一些串的类型: 空串:不含任何字符的串&#x…

信阳公司做网站托管管理系统app

目录 主要内容 模型研究 1.模型总览 2.boost模块 3.Inverter模块 4.控制模块 5.信号模块 结果一览 下载链接 主要内容 该模型为光伏逆变器低电压穿越仿真模型,采用boost加NPC拓扑结构,基于MATLAB/Simulink建模仿真。模型具备中点平衡…

网页设计动态效果怎么制作西安seo优化公司

本问题已经有最佳答案,请猛点这里访问。下面两个SQL查询有什么区别和号根据以下两个测试结果速度更快(237比460)。据我所知,这是一个标准。。氧化镁不,有细微的差别,你不能说没有差别除了语法之外没有别的区别。虽然只有一个简短的…

用于做网站的软件wordpress微信公众号开发

MR混合现实情景实训教学系统是一种将虚拟现实(VR)、增强现实(AR)相结合的先进技术。在法律教学课堂上,MR教学系统为学生模拟模拟法庭、案例分析等多种形式,让学生在实践中掌握法律知识,提高法律…

新余 网站建设做手机网站多少钱

ResNet (Residual Network) 是由微软研究院的何凯明等人在2015年提出的一种深度卷积神经网络结构。ResNet的设计目标是解决深层网络训练中的梯度消失和梯度爆炸问题,进一步提高网络的表现。下面是一个ResNet模型实现,使用PyTorch框架来展示如何实现基本的…

甘肃省建设工程网上投标网站成都住房和城乡建设局网站首页

背景: staticMesh 会根据业务需要随时变化,然后通过staticMesh的大小自适应相机位置,捕捉画面用来预览该模型,使模型在画布中不会太大导致显示不全,也不会太小 参考: UE实现相机聚焦物体功能_右弦GISer的…

网页设计素材网站大全展馆设计都是找的什么公司

1. 概述Linux系统启动过程中通过init_task创建0号idle进程。然后通过kernel_thread创建1号init进程。创建该进程时通过系统调用,在内核空间执行用户空间的/sbin/init程序,通过该程序产生出shell,并依赖init衍生出其他进程。通过top命令查看当…

最基本的网络营销站点中小企业网站制作报价

题目描述 Kiana最近沉迷于一款神奇的游戏无法自拔。 简单来说,这款游戏是在一个平面上进行的。 有一架弹弓位于(0,0)处,每次Kiana可以用它向第一象限发射一只红色的小鸟,小鸟们的飞行轨迹均为形如的曲线,其中a,b是Kiana指定的参数…