3

I am intended to make an application that stream live videos from one android phone to other. I have made one module that is recording the video. Now I want to stream the video to other android phone at the same time as I start recording the video. I have been searching internet over a month for finding the solution, but could not find any. Below are some links. Live-stream video from one android phone to another over WiFi https://android.stackexchange.com/questions/33456/video-streaming-among-android-devices-using-wi-fi-without-internet

Apart from the above mentioned links there is no such link on my laptop left that I did not visit for solution.

Please help me in finding any solution . I am just stuck in the middle of nowhere. Thanks in advance.

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_video_app_main);

        mRecordView = (Button) findViewById(R.id.recordButton);
        mPlayView= (Button) findViewById(R.id.playButton);
        mVideoView= (VideoView) findViewById(R.id.videoView);
        mRecordView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent callVideoAppIntent= new Intent ();
                callVideoAppIntent.setAction(MediaStore.ACTION_VIDEO_CAPTURE);
                startActivityForResult(callVideoAppIntent,ACTIVITY_START_CAMERA_APP);

            }
        });
        mPlayView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mVideoView.start();

            }
        });

    }

    protected void onActivityResult(int requestCode, int resultCode, Intent data){

        if(requestCode == ACTIVITY_START_CAMERA_APP && resultCode == RESULT_OK){
            Uri videoUri= data.getData();
            mVideoView.setVideoURI(videoUri);

        }

    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_video_app_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}
Community
  • 1
  • 1
sidra Aleem
  • 382
  • 1
  • 3
  • 15

0 Answers0