我有一个Android应用程序作为运行在Node.js服务器上的WebRTC服务器的客户端运行.该应用程序的当前状态是我可以进行视频通话,但无法在DataChannel上发送消息.
这是我的Android应用程序的完整代码.
Home.java
public class Home extends Activity {
public List<PeerConnection.IceServer> iceServers;
private GLSurfaceView videoView;
public static SocketIO socket;
ArrayList<String> userIDs = new ArrayList<>();
private static final String FIELD_TRIAL_VP9 = "WebRTC-SupportVP9/Enabled/";
String RoomId = "";
String sreverURL = "http://xx.xx.xx.xx:xxxx/";
private EditText roomid;
private VideoRenderer.Callbacks remote_view;
private VideoRenderer.Callbacks local_view;
protected PeerConnectionFactory factory;
PeerConnectionFactory.Options options = null;
Events pc_events;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
videoView = (GLSurfaceView) findViewById(R.id.glview_call_remote);
VideoRendererGui.setView(videoView, new Runnable() {
@Override
public void run() {
createPeerConnectionFactory();
} …Run Code Online (Sandbox Code Playgroud) 因此,我尝试通过Intent.ACTION_DIAL以 # ie 结尾的方式发送一个号码*123#。但是当Android Dialer应用程序启动时,只有*123(#号丢失)。我正在使用以下代码来触发 Android 的拨号应用程序。
Uri number = Uri.parse("tel:*124#");
Intent callIntent = new Intent(Intent.ACTION_DIAL, number);
context.startActivity(callIntent);
Run Code Online (Sandbox Code Playgroud)
期待感谢!!。