自己做的一些安卓绑定好的第三方库并带demo的项目
喜欢请帮我点个star
希望能够帮助大家。
使用demo进行更改首先考虑 application然后是AndroidManifest.xml
里面的很多细节请注意复制和查看尤其是包名
以下demo都是以真机为主。如果想在模拟器运行。请注意拷贝x86相关so文件到lib中
https://github.com/jsonsugar/XamainAndroidBindLibary/tree/master/Xg-Push/XinGeDemo
注意更换为你自己的app_id
新的安卓版本导致预览会非常麻烦 比如我们要在预览中加个框框或者设计个图标之类的 需要用到预览实现 所以我编写了一个demo 方便大家定制化摄像头预览
https://github.com/yanzhenjie/Sofia/ 沉浸状态栏
注意友盟推送需要签入java文件才行 因为友盟会起一个新进程
聊天im集成 https://github.com/MobClub/MobIM-for-Android/
安卓里面使用串口
这个库官方nuget上有最新的 绑定只是我需要3.6的所以单独绑定了下
百度的安卓推送 示例代码
微信支付与分享安卓绑定库
极光绑定库
https://opendocs.alipay.com/iot/01kjr6 需要注意 库里面依赖了fastjson 所以需要单独处理下json 我们用Newtonsoft 中的json 处理好后序列化为String 调用JSON.Parse(string) 再传入onMessage() 中
绑定来源 https://github.com/Devil-Chen/DVMediaSelector
//default
//create builder
RtmpCamera1 rtmpCamera1 = new RtmpCamera1(openGlView, connectCheckerRtmp);
//start stream
if (rtmpCamera1.PrepareAudio() && rtmpCamera1.PrepareVideo()) {
rtmpCamera1.StartStream("rtmp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtmpCamera1.StopStream();
//with params
//create builder
RtmpCamera1 rtmpCamera1 = new RtmpCamera1(openGlView, connectCheckerRtmp);
//start stream
if (rtmpCamera1.PrepareAudio(int bitrate, int sampleRate, boolean isStereo, boolean echoCanceler,
boolean noiseSuppressor) && rtmpCamera1.PrepareVideo(int width, int height, int fps, int bitrate, int rotation)) {
rtmpCamera1.StartStream("rtmp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtmpCamera1.StopStream();
//请先获取下摄像头 麦克风权限 文件读写权限
//create builder
//by default TCP protocol.
RtspCamera1 rtspCamera1 = new RtspCamera1(this, new ConnectCheckerRtsp());
//start stream
if (rtspCamera1.PrepareAudio() && rtspCamera1.PrepareVideo())
{
rtspCamera1.StartStream("rtsp://yourEndPoint");
}
else
{
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
//with params
//create builder
RtspCamera1 rtspCamera1 = new RtspCamera1(openGlView, connectCheckerRtsp);
rtspCamera1.setProtocol(protocol);
//start stream
if (rtspCamera1.PrepareAudio(int bitrate, int sampleRate, boolean isStereo, boolean echoCanceler,
boolean noiseSuppressor) && rtspCamera1.PrepareVideo(int width, int height, int fps, int bitrate, int rotation)) {
rtspCamera1.StartStream("rtsp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtspCamera1.StopStream();