package com.example.patrice.broadcast_receiver;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;

//https://www.tutorialspoint.com/android/android_broadcast_receivers.htm

// http://www.journaldev.com/10356/android-broadcastreceiver-example-tutorial#

public class MainActivity extends Activity
{

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }


    // broadcast a custom intent.

    public void broadcastIntent(View view){
        Intent intent = new Intent();
        intent.setAction("com.tutorialspoint.CUSTOM_INTENT");
        sendBroadcast(intent);
    }
}