首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >BS1053-基于安卓+websocket实现大学校园社交通讯APP

BS1053-基于安卓+websocket实现大学校园社交通讯APP

作者头像
计算机程序优异哥
发布2022-12-05 10:27:25
2340
发布2022-12-05 10:27:25
举报
文章被收录于专栏:毕设程序汇总毕设程序汇总

基于安卓的校园社交通讯APP,系统基于安卓架构开发实现手机端校园社交圈子功能。程序主要包含用户注册,用户登录,线上聊天,发布朋友圈,用户通讯录,文件发送,个人信息等功能模块,系统集成

实现了用户朋友圈内容的广播推送,实现用户聊天窗口发送图片及文件。

原文地址

一、程序设计

本次基于地图实现的车位智慧推荐系统APP,主要内容涉及:

主要功能模块:用户注册,用户登录,线上聊天,发布朋友圈,用户通讯录,文件发送,个人信息等

主要包含技术:java,安卓,websocket,html,javascript

主要包含算法:数据分析计算等

二、效果实现

系统效果

在这里插入图片描述
在这里插入图片描述

其他效果省略

核心代码

class Builder extends Message{

const soundUri = 'sound_uri';
const notifyForeground = 'notify_foreground';
const notifyEffect = 'notify_effect';
const intentUri = 'intent_uri';
const webUri = 'web_uri';
const flowControl = 'flow_control';
const callback = 'callback';
public function __construct(){
	$this->notify_id = 0;
	$this->notify_type = -1;
	$this->payload = '';
	$this->restricted_package_name = Constants::$packageName;
	parent::__construct();
}
public function payload($payload){
	$this->payload = $payload;
}
public function title($title){
	$this->title = $title;
}
public function description($description){
	$this->description = $description;
}
public function passThrough($passThrough){
	$this->pass_through = $passThrough;
}
public function notifyType($type){
	$this->notify_type = $type;
}
public function restrictedPackageNames($packageNameList){
            $jointPackageNames = '';
	foreach($packageNameList as $packageName){
		if(isset($packageName)){
			$jointPackageNames .= $packageName.Constants::$comma;
		}
	}
	$this->restricted_package_name = $jointPackageNames;
}
public function timeToLive($ttl){
	$this->time_to_live = $ttl;
}
public function timeToSend($timeToSend){
	$this->time_to_send = $timeToSend;
}
public function notifyId($notifyId){
	$this->notify_id = $notifyId;
}
public function extra($key,$value){
	$this->extra[$key] = $value;
}
public function build(){
	$keys = array(
			'payload','title','description','pass_through','notify_type',
			'restricted_package_name','time_to_live','time_to_send','notify_id'		
	);
	foreach($keys as $key){
		if(isset($this->$key)){
			$this->fields[$key] = $this->$key;
			$this->json_infos[$key] = $this->$key;
		}
	}
	//单独处理extra
	$JsonExtra = array();
	if(count($this->extra) > 0){
		foreach($this->extra as $extraKey=>$extraValue){
			$this->fields[Message::EXTRA_PREFIX.$extraKey] = $extraValue;
			$JsonExtra[$extraKey] = $extraValue;
		}
	}
	$this->json_infos['extra'] = $JsonExtra;
}

}

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
作者已关闭评论
0 条评论
热度
最新
推荐阅读
目录
  • 一、程序设计
  • 二、效果实现
    • 系统效果
    • 核心代码
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档