Every time I run my application in android studio it opens a white page

I am using the android studio to build an application. I did my login and signup page and connected them together but every time I try to open the signup page from my main page it opens a white page. this is the code for Signup page

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=”http://schemas.android.com/apk/res/android”
xmlns:app=”http://schemas.android.com/apk/res-auto”
xmlns:tools=”http://schemas.android.com/tools”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
tools:context=”.SignUp”>

<View
    android:id="@+id/view3"
    android:layout_width="wrap_content"
    android:layout_height="150dp"
    android:background="@color/colorPrimary"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<View
    android:id="@+id/view6"
    android:layout_width="0dp"
    android:layout_height="100dp"
    android:background="@drawable/wave"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/view3" />

<TextView
    android:id="@+id/textView2"
    android:layout_width="163dp"
    android:layout_height="96dp"
    android:layout_marginTop="36dp"
    android:text="@string/create_account"
    android:textColor="#FFFFFF"
    android:textSize="30sp"
    android:textStyle="bold"
    app:layout_constraintEnd_toEndOf="@+id/view3"
    app:layout_constraintHorizontal_bias="0.129"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

<ImageView
    android:id="@+id/imageView3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="32dp"
    android:layout_marginEnd="16dp"
    android:layout_marginRight="16dp"
    app:layout_constraintEnd_toEndOf="@+id/view3"
    app:layout_constraintTop_toTopOf="parent"
    app:srcCompat="@drawable/ic_person"
    tools:ignore="ContentDescription" />

<EditText
    android:id="@+id/textName"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="32dp"
    android:layout_marginLeft="32dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="32dp"
    android:layout_marginRight="32dp"
    android:background="@drawable/round_border"
    android:drawableStart="@drawable/ic_person_2"
    android:drawablePadding="16dp"
    android:ems="10"
    android:hint="@string/name"
    android:inputType="text"
    android:padding="16dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/view6"
    tools:ignore="Autofill,RtlCompat" />

<EditText
    android:id="@+id/inputEmail2"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="32dp"
    android:layout_marginLeft="32dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="32dp"
    android:layout_marginRight="32dp"
    android:background="@drawable/round_border"
    android:drawableStart="@drawable/ic_email"
    android:drawablePadding="16dp"
    android:ems="10"
    android:hint="@string/email_create_account"
    android:inputType="textEmailAddress"
    android:padding="16dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/textName"
    tools:ignore="Autofill,RtlCompat" />

<EditText
    android:id="@+id/textPass"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="32dp"
    android:layout_marginLeft="32dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="32dp"
    android:layout_marginRight="32dp"
    android:background="@drawable/round_border"
    android:drawableStart="@drawable/ic_lock"
    android:drawablePadding="16dp"
    android:ems="10"
    android:hint="@string/password_create_account"
    android:inputType="textPassword"
    android:padding="16dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/inputEmail2"
    tools:ignore="Autofill,RtlCompat" />

<Button
    android:id="@+id/btnUp"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="50dp"
    android:layout_marginLeft="50dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="50dp"
    android:layout_marginRight="50dp"
    android:background="@drawable/round_bg"
    android:text="@string/sign_up2"
    android:textColor="#FFFFFF"
    android:textSize="18sp"
    android:textStyle="bold"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@id/textPass" />

<Button
    android:id="@+id/btnIn"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_marginStart="50dp"
    android:layout_marginLeft="50dp"
    android:layout_marginTop="16dp"
    android:layout_marginEnd="50dp"
    android:layout_marginRight="50dp"
    android:background="@drawable/round_bg"
    android:text="@string/sign_in2"
    android:textColor="#FFFFFF"
    android:textSize="18sp"
    android:textStyle="bold"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@+id/btnUp" />

</androidx.constraintlayout.widget.ConstraintLayout>

my main activity java code page:

public class MainActivity extends AppCompatActivity {

Button btnLogin, btnSignUp;

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

    //Hooks

    btnLogin=findViewById(R.id.btnSigning);
    btnSignUP=findViewById(R.id.btnSignUpMain);

    btnLogin.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent (MainActivity.this,SignIn.class);
            startActivity(intent);
        }
    });
    btnSignUp.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            Intent intent = new Intent (getApplicationContext(),SignUp.class);
            startActivity(intent);
        }
    });
}

}

Thanks for your help in advance 🙂

App Windows – SILKYPIX Developer Studio Pro 10.0.9.0 (x64) Portable

File Size: 399.6 MB

7 new features and workflow innovation. The blissful time named RAW development for you. Enables the user a impressive image quality and new expression The wide variety of composition modes can excite your imagination. Equipped with 6 RAWs composition modes. The new SILKYPIX® is equipped with the new function for compositing multiple RAWs which allows you to create a view of the world that cannot be represented from a single image. And, since this function automatically aligns images according to our image coincidence detection technology (patent No. 4689758), it is possible to combine them without any shift even with hand-held shooting.
​

Full Basic Functions
SILKYPIX allows you to make adjustments such as exposure (brightness), white balance (shading), tone (light and dark sharpness) while maintaining a high quality of image without deteriorating the image. In addition, anyone can easily perform high-quality adjustments because basic adjustments are arranged in order from the top of the control panel. Furthermore, fine tuning adjustments for each item can be minutely performed with the “Slider” control.

A Variety of Functions to Recreate the Photographer’s Images
The Partial correction function is included to adjust saturation and brightness of specified areas. What is more, a variety of fine adjustment functions such as Fine color controller which can be used to adjust each specific color and Highlight controller which restores colors in highlighted parts as well as recover gradation are available.

Easy Editing with Tastes
SILKYPIX Pro has 10 types of maker tastes installed which can take on various shooting scenes in advance. Just by choosing a taste such as “Landscape” or “Portrait,” you can make a finished photograph easily that fits your image. In addition, you can save your adjusted parameters as a taste. Parameters are very useful functions, and you can easily create pictures from the same image by applying them to other photographs.

Compliable with JPEG and TIFF
With “SILKYPIX RAW Bridge” available only on SILKYPIX Pro, JPEGs and TIFFs are expanded to 16 bits, so even JPEG and TIFF images can be adjusted to a high degree of image quality with less image degradation.

Exposure (Brightness)
– Auto exposure bias
– Exposure bias
– Dodge / Color Burn
– HDR
– Highlight / Shadow

White balance (Tint)
– White balance adjustment
– Gray balance tool
– Skin color tool

Tone (Sharpness of light and dark)
– Contrast
– Tone curve
– Automatic level correctio
– Black level tool
– Clarity
– Dehaze

Saturation (Vividness)
– Prepare presets for Color representation (Standard color, Memory color, Portrait color, Film color)

Sharpening
– Natural sharp
– Normal sharp
– Pure detail
– Unsharp mask

Noise adjustment
– Color distortion
– Fringe reduction
– Neat noise
– Noise reduction
– Reduce moire
– Level of shadow noise reduction

Practical functions (A part of functions)
– Lens aberration correction
– Shading
– Distortion
– Chromatic aberration
– Distortion correction function by lens profile
– Distortion correction function using simultaneous recording JPEG

Image correction tool
– Crop
– Image rotation
– Shift lens effect
– Spotting tools (Dust removal)
– Red Eye Corrections

Partial correction tool
– Circular correction filter
– Gradual correction filter
– Select area with brush
– Curve / Polygon area selection
– Select color to be corrected
– Invert the filter area

Image controller
– Fine color controller (Adjustment of specific color)
– Highlight controller (Gradation expression of highlights)
– Monochrome controller (Adjustment monochrome image)
– Underwater photo controller (Adjustment underwater photograph)

Display warning
– Highlight warning
– Shadow warning
– Out of color gamut warning
– Soft proofing
– Focus peaking(Display focus area on monitor)

Others
– Search in the thumbnail
– Automatic adjustment button
– Independent arrangement of initialization button
– Open in another application
– Blurred / Sharp periphery
– Portrait Beautification
– Add Noise

RELEASE NOTES

System Requirements:
– Microsoft® Windows® 10 / 8.1 64-bit version
– * It does not correspond to the Windows® 10 tablet mode.
– * It does not correspond to 32-bit version OS.
– Intel® Core™ 2 Duo or higher, or AMD Athlon™ 64 X2 or higher processor
– 4GB or more RAM (8GB or higher recommended)
– 10GB of available hard-disk space or more
– Display that supports screen resolution of 1024×768 or higher

HOMEPAGE

Download From Rapidgator

Download From Nitroflare
​

Android Studio error with webview: “Unresolved reference: webView”

I’m trying to load a url link into my app in Android Studio. And when I run it to my device, it shows an error: “Unresolved reference: webView”. Here is my code:

MainActivity.kt :

package com.example.test
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        webView = findViewById(R.id.webview)
        webView.settings.setJavaScriptEnabled(true)
        webView.loadUrl("https://www.google.com/")
    }

}

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.kotlinwebview.MainActivity">

<WebView
    android:id="@+id/webview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
</android.support.constraint.ConstraintLayout>

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.test">
<uses-permission android:name="android.permission.INTERNET"/>
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.Test">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/Theme.Test.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Does somebody know what the problem is?

App Mac – SILKYPIX Developer Studio Pro 10.0.9.0 macOS

File size: 402 MB

SILKYPIX Developer Studio Pro10 is equipped with a new function for compositing multiple RAWs which enables the user a previously unprecedented level of creative photographic expression.​

The latest transformative enhancement to the software’s capabilites is the “Fine detail” mode which enables the optimal noise reduction. In addition, the “Select” section enables high-speed display of a large number of high-resolution images.
Professional edition of RAW development software with improved flexibility and ease of use.

SILKYPIX Developer Studio Pro adds new functions that were highly desired

in addition to the rich features of SILKYPIX so far.

– Tone- Dehaze Slider

– Exposure bias-Highlight / Shadow slider

– Lens aberration correction – Distortion correction function by lens profile

– Lens aberration correction – Distortion correction function

using simultaneous recording JPEG

– Effect – Blurred / Sharp periphery

– Partial correction tool – Curve / Polygon area selection / Select color

to be corrected

– Automatic adjustment button

– Noise Reduction – Level of shadow noise reduction

– Search in the thumbnail

– Independent arrangement of initialization button

– Add user mark color

– Open in another application

– Control Palette

– Customize toolbar

– Show / hide information box

macOS 10.13 or later 64-bit

DOWNLOAD
nitroflare

 

How to connect to a local SQL Server instance by IP Address in SQL Server Management Studio?

I’m writing some test code that is required to connect to a local SQL Server instance (SQL Server 2017 – Developer Edition) by IP address. I have the SQL Server instance up and running on my machine, but can’t figure out the correct IP + Port to use for my connection string’s Server property.

As a starting point, I’m trying to at least manually connect to my server instance with SQL Server Management Studio (via the IP address) but I can’t seem to figure it out.

  1. How do I find the IP Address and Port of my local SQL Server instance?
  2. What is the correct format I should be inputting the IP Address and Port into the Server Name field of SSMS (and is it the same format as a connection string Server property)?

I’ve tried locating the IP address executing the following SQL code on it:

SELECT  
   CONNECTIONPROPERTY('net_transport') AS net_transport,
   CONNECTIONPROPERTY('protocol_type') AS protocol_type,
   CONNECTIONPROPERTY('auth_scheme') AS auth_scheme,
   CONNECTIONPROPERTY('local_net_address') AS local_net_address,
   CONNECTIONPROPERTY('local_tcp_port') AS local_tcp_port,
   CONNECTIONPROPERTY('client_net_address') AS client_net_address 

But the local_net_address and local_tcp_port fields are NULL and the client_net_address is set to <local machine>:
SQL Server Connection Property

I’ve also tried going into the SQL Server Configuration Manager, under the SQL Server Network Configuration section, and enabling TCP/IP. Then I tried using a mix of the IP4 and IP6 addresses with Port 1433 (which is blank by default in the TCP/IP Properties, but I’ve tried leaving it blank and setting it to 1433) and that didn’t work.

SQL Server Configuration Manager - SQL Server Network Configuration
(I made sure to restart the SQL Server service and SQL Server Browser service every time I made changes in here.)

I’ve received the following errors when trying to connect via SSMS for the different combinations of the IP4 address with and without Port specified:

No Port Specified:

IP4 No Port

Port Specified w/ Colon:

IP4 With Port via Colon

Port Specified w/ Comma:
Port Specified via Comma

I’ve also tried connecting via 127.0.0.1 with the same combinations of Port 1433 above to no avail. (I receive similar errors except for the following combinations.)

127.0.0.1 w/o Port:

Localhost IP No Port

127.0.0.1 w/ Port via comma:

Localhost IP with Port via comma

java – How to reestablish a Bluetooth connection after I leave an activity in Android Studio?

I am working on a project that can send and receive Strings to and from an Arduino to control and monitor various sensors and lights. I am running into an issue where once I leave the activity that connects to Bluetooth and then return to that same activity after visiting the home activity I am no longer able to send and receive data. The sending and receiving of strings works perfectly until I leave the activity to go to the home activity and come back.

Here is the Java code for the sensor activity:

package com.example.arduinocontrol;

import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Set;
import java.util.UUID;
import android.annotation.SuppressLint;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class uvlight extends AppCompatActivity implements OnClickListener{
    private static final int REQUEST_ENABLE_BT = 1;
    private CardView uvLight;
    //listeners for button presses
    Button on, off,clear;
    //textbox below buttons
    TextView t1,t2,t3;

    BluetoothAdapter mBluetoothAdapter;
    BluetoothDevice mDevice;
    ByteArrayInputStream mSocket;
    ConnectedThread mConnectedThread = null;
    ConnectThread mConnectThread = null;


    @Override
    protected void onCreate(Bundle savedInstanceState)
    {

        //Instantiation
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_uvlight);



        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        if (mBluetoothAdapter == null) {
            Toast.makeText(getApplicationContext(),"BT not supported!", Toast.LENGTH_SHORT).show();
            return;
        }
        if (!mBluetoothAdapter.isEnabled()) {
            //opens a window to ask user to turn on bluetooth
            Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
            startActivityForResult(enableBtIntent, 1);
        }
        Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
        if (pairedDevices.size() > 0) {
            for (BluetoothDevice device : pairedDevices) {

                    mDevice = device;

            }
        }

        mConnectThread = new ConnectThread(mDevice);
        mConnectThread.start();


        try {
            setw();
        } catch (Exception e) {
            e.printStackTrace();
        }


    }

    @SuppressLint("ClickableViewAccessibility")
    private void setw() throws IOException {
        //text for bluetooth device details
        t1=(TextView)findViewById(R.id.textView3);
        t2=(TextView)findViewById(R.id.response);

        t2.setMovementMethod(new ScrollingMovementMethod());


            String name = mDevice.getName().toString();

            try {
                t1.setText("Connected to:  " + name);
            } catch (Exception e) {
                e.printStackTrace();
            }


        //links on and off to their element IDs
        on=(Button)findViewById(R.id.uvlighton);
        off=(Button)findViewById(R.id.uvlightoff);
        clear=(Button)findViewById(R.id.clear);

        //clears log text
        clear.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                t2.setText("");
            }
        });


        on.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View v)
            {
                //sends 'o' char to Arduino
                // method to turn on uv light
                if(mConnectedThread != null) {
                    //String sig = "o";
                    //mConnectedThread.write(sig.getBytes());
                    int sig = 112;
                    mConnectedThread.write(sig);
                }
            }
        });


        off.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v)
            {
                //method to turn off uv light
                if(mConnectedThread != null) {
                    //String sig1 = "f";
                    //mConnectedThread.write(sig1.getBytes());
                    int sig = 113;
                    mConnectedThread.write(sig);

                }
            }
        });


    }
    private class ConnectThread extends Thread {

        private final BluetoothSocket mmSocket;
        private final BluetoothDevice mmDevice;
        //HC-05 unique uuid
        private final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");

        public ConnectThread(BluetoothDevice device) {
            BluetoothSocket tmp = null;
            mmDevice = device;
            Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();

                    try {
                        //creates RFCOMM socket
                        tmp = device.createRfcommSocketToServiceRecord(MY_UUID);
                        //shows user they are connected
                        Toast.makeText(getApplicationContext(), "Connected to your Arduino", Toast.LENGTH_SHORT).show();
                        //displays bt info in text field
                    } catch (IOException e) {
                        Toast.makeText(getApplicationContext(), "Unable to connect!", Toast.LENGTH_SHORT).show();
                    }

                    mmSocket = tmp;

        }
        public void run() {
            mBluetoothAdapter.cancelDiscovery();
                //need the if for this edge case

                    try {
                        mmSocket.connect();
                    } catch (IOException connectException) {
                       try {
                        if (mSocket != null) {
                            mSocket.close();
                        }
                        } catch (IOException closeException) {
                            Toast.makeText(getApplicationContext(), "Unable to connect socket!", Toast.LENGTH_SHORT).show();
                        }
                        return;
                    }

                    //new connected thread obj
                    mConnectedThread = new ConnectedThread(mmSocket);
                    mConnectedThread.start();

            }

        public void cancel() {

                    try {
                        mmSocket.close();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }


        }
    }
    //Thread for bluetooth process
    private class ConnectedThread extends Thread {
        //copies bt socket for threading
        private final BluetoothSocket mmSocket;
        //copies input stream obj for threading
        private final InputStream mmInStream;
        //copies output stream obj for threading
        private final OutputStream mmOutStream;

        public ConnectedThread(BluetoothSocket socket) {
            mmSocket = socket;
            InputStream tmpIn = null;
            OutputStream tmpOut = null;

                    try {
                        tmpIn = socket.getInputStream();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }


                    try {
                        tmpOut = socket.getOutputStream();
                    } catch (IOException e) {
                        e.printStackTrace();
                    }

                mmInStream = tmpIn;
                mmOutStream = tmpOut;

        }
        //reads from Arduino
        @Override
        public void run() {
            byte() buffer = new byte(1024);
            int begin = 0;
            int bytes = 0;

                    while (true) {
                        try {
                            bytes += mmInStream.read(buffer, bytes, buffer.length - bytes);
                            for (int i = begin; i < bytes; i++) {
                                //end char for a given message from Arduino
                                if (buffer(i) == "#".getBytes()(0)) {
                                    mHandler.obtainMessage(1, begin, i, buffer).sendToTarget();
                                    begin = i + 1;
                                    if (i == bytes - 1) {
                                        bytes = 0;
                                        begin = 0;
                                    }
                                }
                            }
                        } catch (IOException e) {
                            break;
                        }
                    }

        }

        //writes to the output stream (in this case the Arduino)
        public void write(/*byte() bytes*/int num) {

                try {
                    Toast.makeText(getApplicationContext(), "sending bytes", Toast.LENGTH_SHORT).show();
                    mmOutStream.write(num);
                } catch (IOException e) {
                    e.printStackTrace();
                }


        }

        public void cancel() {

                try {
                    mmSocket.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }

        }
    }

    @Override
    public void onClick(View v)
    {
        try
        {

        }
        catch (Exception e)
        {
            //displays toast message
            Toast.makeText(getApplicationContext(),e.getMessage(), Toast.LENGTH_SHORT).show();

        }
    }

    //Suppresses an annoying handler lear warning
    @SuppressLint("HandlerLeak")
    Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message msg) {
            byte() writeBuf = (byte()) msg.obj;
            int begin = (int)msg.arg1;
            int end = (int)msg.arg2;


            switch(msg.what) {
                case 1:
                    String writeMessage = new String(writeBuf);
                    writeMessage = writeMessage.substring(begin, end);

                    //sends message to homepage to turn cardview red
                    //string called error contains value of writeMessage
                    Intent intent = new Intent("errorCode").putExtra("error", writeMessage);
                    LocalBroadcastManager.getInstance(uvlight.this).sendBroadcast(intent);

                    //write message to the scrolling textbox
                    t2.append(writeMessage);
                    break;
            }
        }
    };

}

Here is the Java code for the home activity:

package com.example.arduinocontrol;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;

public class HomeActivity extends AppCompatActivity implements View.OnClickListener {
    private CardView airPump, flowMeter, humiditySensor, levelSwitch1, levelSwitch2, lightStrip, phMeter, uvLight, waterPump, solenoidValve, nutrientPump;




    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        //defines cards
        airPump = (CardView) findViewById(R.id.airpump);
        flowMeter = (CardView) findViewById(R.id.flowmeter);
        humiditySensor = (CardView) findViewById(R.id.humiditysensor);
        levelSwitch1 = (CardView) findViewById(R.id.levelswitch1);
        levelSwitch2 = (CardView) findViewById(R.id.levelswitch2);
        lightStrip = (CardView) findViewById(R.id.lightstrip);
        phMeter = (CardView) findViewById(R.id.phmeter);
        uvLight = (CardView) findViewById(R.id.uvlight);
        waterPump = (CardView) findViewById(R.id.waterpump);
        solenoidValve = (CardView) findViewById(R.id.solenoidvalve);
        nutrientPump = (CardView) findViewById(R.id.nutrientpump);
        //click listeners
        airPump.setOnClickListener(this);
        flowMeter.setOnClickListener(this);
        humiditySensor.setOnClickListener(this);
        levelSwitch1.setOnClickListener(this);
        levelSwitch2.setOnClickListener(this);
        lightStrip.setOnClickListener(this);
        phMeter.setOnClickListener(this);
        uvLight.setOnClickListener(this);
        waterPump.setOnClickListener(this);
        solenoidValve.setOnClickListener(this);
        nutrientPump.setOnClickListener(this);


        LocalBroadcastManager.getInstance(this).registerReceiver(mReceiver, new IntentFilter("errorCode"));


    }

    //turns Uvlight card red when an error is sent
    private BroadcastReceiver mReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            String errorMsg = intent.getStringExtra("error");
            if (errorMsg.equals("-3")){
                uvLight.setCardBackgroundColor(0xFFFF0000);
            }
        }
    };

    @Override
    public void onBackPressed() {
        moveTaskToBack(true);
    }

    @Override
    public void onClick(View v) {
        Intent i;

        //on click opens the new activity
        switch(v.getId()){
            case R.id.airpump : i = new Intent(this,Airpump.class); startActivity(i); break;
            case R.id.flowmeter : i = new Intent(this,Flowmeter.class); startActivity(i); break;
            case R.id.humiditysensor : i =new Intent(this,Humiditysensor.class); startActivity(i); break;
            case R.id.levelswitch1 : i = new Intent(this,Levelswitch1.class); startActivity(i); break;
            case R.id.levelswitch2 : i = new Intent(this,Levelswitch2.class); startActivity(i); break;
            case R.id.lightstrip : i = new Intent(this,Lightstrip.class); startActivity(i); break;
            case R.id.phmeter : i = new Intent(this,Phmeter.class); startActivity(i); break;
            case R.id.uvlight : i = new Intent(this,uvlight.class); startActivity(i); break;
            case R.id.waterpump : i = new Intent(this,Waterpump.class); startActivity(i); break;
            case R.id.solenoidvalve : i = new Intent(this,solenoidvalve.class); startActivity(i); break;
            case R.id.nutrientpump : i = new Intent(this,Nutrientpump.class); startActivity(i); break;
            default:break;
        }
    }
}

I am new to Android Studio and this is the first time I have had to make a multi-threaded application. Thank You.