英文:
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
简单建议:
- 将文件上传至 Firebase 存储
- 将已上传文件的 URL 写入 Firebase 实时数据库
- 在另一设备上监听 Firebase 实时数据库
- 获取文件 URL 并将文件下载到设备
- 播放音频文件
英文:
Simple advice:
- Upload File to Firebase Storage
- Write url of uploaded file to Firebase Realtime Database
- Listen to Firebase Realtime Database with other device
- Get file url and download file to device
- Play audio file
专注分享java语言的经验与见解,让所有开发者获益!
评论