Apidays New York 2024 - The value of a flexible API Management solution for O...
Android chat app1
1.
2. Create a basic chat
application that uses
broadcast UDP to send
and receive messages
on the local network .
You: Your text
3. Toggle Button for turning WiFi on or
off.
Scan Button for searching the all
available WiFi Connection.
Spinner will display the list of available
connection and user will select
perticular one.
Connect Button will establish the
connection.
4. List View showing
both the messages sent as
well as received
Edit Text allowing users
to enter text to be sent
You: Your text
Send button – sends the text
5. ClassMembers
◦ WifiManager wifi;
◦ ToggleButton wifion; // to switch the wifi on or off
◦ Button buttonScan; //to scan all the available wifi
◦ Button connect; //to connect to the wifi
◦ Spinner sp; //to display the list of all wifi
◦ ArrayList <String> items;
◦ ArrayAdapter <String>adapter;
OnCreate( )
◦ Get handles (findViewById) to all GUI elements
◦ msgList = (ListView)findViewById(R.id.msgList);
◦ receivedMessages = new ArrayAdapter<String>(this, R.layout.message);
◦ msgList.setAdapter(receivedMessages);
◦ Register the OnClickListener for the Send Button
OnClickListener( )
OnClick( )