P2P音频共享在安卓平台上

huangapple 未分类评论45阅读模式
英文:

P2P Audio Sharing in Android

问题

我正在进行一个Android项目,其中我可以通过相同的应用将音频文件分享到另一部手机。音频文件应在另一端播放。我正在使用Firebase存储来上传和播放该文件。

然而,我想建立点对点通信(我仍然可以继续使用Firebase,但我想尝试一下这种方法来共享文件)。我已经尝试查找一些关于这方面的教程,但没有成功!

英文:

I am working on an Android project where I can share audio files to another phone with the same app. The audio file should be playing at the other end. I am using Firebase Storage to upload and play the file.

However, I would like to establish a p2p communication (I still can stick with Firebase but I would like to try this out to share files). I have tried to look up for some tutorials on it but no luck!

答案1

得分: 0

简单建议:

  1. 将文件上传至 Firebase 存储
  2. 将已上传文件的 URL 写入 Firebase 实时数据库
  3. 在另一设备上监听 Firebase 实时数据库
  4. 获取文件 URL 并将文件下载到设备
  5. 播放音频文件
英文:

Simple advice:

  1. Upload File to Firebase Storage
  2. Write url of uploaded file to Firebase Realtime Database
  3. Listen to Firebase Realtime Database with other device
  4. Get file url and download file to device
  5. Play audio file

huangapple
  • 本文由 发表于 2020年4月7日 19:06:46
  • 转载请务必保留本文链接:https://java.coder-hub.com/61078589.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定