October 2018
Intermediate to advanced
464 pages
15h 17m
English
We only need a single TextView on the layout to display the event information. Open the activity_main.xml file and follow these steps:
<TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
PhoneStateListener mPhoneStateListener = new PhoneStateListener() { @Override public void onCallStateChanged(int state, String number) ...