Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Android mobile application in Java The application will create a customized service (extend from service) to keep generating random character every one second from A

Android mobile application in Java

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

The application will create a customized service (extend from service) to keep generating random character every one second from A to Z using a new thread (DO NOT use application main thread). Here are the important characteristics: There should be two buttons, start service and stop service, shown on the app. The start button will trigger the random character generator service. The stop button will stop the service. Whenever the service status changed, you should display the current service status in the logcat. When random character generator service is running, the random character the service generated must be shown in the logcat. Here are the screenshots of the lab application: Android Emulator - Nexus_6_API_25.5554 23:35 RandomNumberService Application Random Number Service Home START SERVICE STOP SERVICE Android Emulator - Nexus_6_API_25.5554 3:35 RandomNumberService Application Random Number Service Home START SERVICE STOP SERVICE Text Merged Manifest Android Monitor Emulator Nexus 6 API 25 Android 7.11. AP12 com.example.jhel.randomnumberserviceapplication (223) logcat Monitors Build Variants 09-15 15:31:40.649 2623-2823/com.example.The.randomnumberserviceapplication I/Randomlumber Services In OnStart Command Thread ID is 1 09-15 15:31:49.852 2823-10206/com.example.jhe 4. randomnumberserviceapplication 1/Randomblumber Service Thread TD 1a 119, Random number 13 45 09-15 15:31:50.853 2023-10206/com.example.The randomnumber serviceapplication 1/Randomlumber Services Thread ID i. 119, Random number is 62 09-15 15:31:51.655 2823-10206/com.example.jhet. randomberserviceapplication 1/Randomblumber Service:: Thread ID 1 119, Random number is 49 09-15 15:31:52.855 2223-10206/com.example.jhe 4. randomberserviceapplication I/Randomblumber Service Thread ID 1. 119, Random sumber is? 09-15 15:31:53.857 2823-10206/com.example.jhe 4. randomberserviceapplication 1/Randoblumber Service:: Thread ID 1= 119. Random number 13 84 09-15 15:31:54.95 2223-10206/com.example. The 4. randomberserviceapplication I/Randomblumber se lication I/Randalumber Services Thread ID : 119, Randon number is 70 09-15 15:31:55.858 2023-10206/com.example. The 4. randomnumber serviceapplication 1/Randoalumber Services: Thread ID 18 119, Random number 1885 09-15 15:31:56.860 2023-10206/com.example.jhe. randomnumber serviceapplication 1/Randallumber Service Thread ID 18 119, Random number is 92 09-15 15:31:57.861 2823-10206/com.example.The.candomber serviceapplication 1/Randallumber Services Thread ID 1a 119, Random number 1a 57 wortes Run 2 TODO Android Monitor Terminal Messages Instant Run applied code changes and restarted the app. // (Don't show again) (minutes ago) Tot Merged Manifest Android Monitor Emulator Nexus 6 APL 25 Android 711 APL com.example.jhe randomnumberserviceapplication 223) loga Motors 09-15 15:33:08.932 2023-10206/com.example.hel.randomnumberservice application I/Random e r Service! ThreadID IN 119, Random number is 31 09-15 15:33:09.933 2023-10206/com.example.ghet. Tandenb ervice application t/Random er Services! Thread TD 18 119, Random number 1945 09-15 15:33:10.9342423-10206/com.example.hel. o berservice application I/Randomber Service!! Thread ID 18 119, Random number is 09-15 15:33:11.935 2625-10206/com.example.The.randomberservice application 1/Random er Service Thread ID 13 119, Random number 1976 09-15 15:33:12.937 2023-10206/com.example.jhe n berserviceapplication I/Randomber Service Thread ID 119, Random number is 76 09-15 15:33:13.937 2823-10206/com.example.The. Tandem berserviceapplication I/randomlumber Service!! Thread TD 19 119. Random number 13 26 09-15 15:33:14.930 2625-10206/com.example.hel.randomnumber service application I/Randomlumber Services Thread ID : 119, Random number is 30 09-15 15:33:15.939 2623-10206/com.example.The.randomnumberserviceapplication I/Randomdumber Services Thread ID 18 119, Random number 1991 09-15 15:33:16.941 2623-10206/com.example.hel. Tandem number serviceapplication 1/Randomlumber Services Thread ID 1 119, Random number is 09-15 15:33:17.414 2823-2523/com.example.The random service application 1/Randomber Services Service Destroyed. Run TODO Android Monitor Terminal Messages Instant Run applied code changes and restarted the app. I Don't show again) 0 minutes ago) W DTP The application will create a customized service (extend from service) to keep generating random character every one second from A to Z using a new thread (DO NOT use application main thread). Here are the important characteristics: There should be two buttons, start service and stop service, shown on the app. The start button will trigger the random character generator service. The stop button will stop the service. Whenever the service status changed, you should display the current service status in the logcat. When random character generator service is running, the random character the service generated must be shown in the logcat. Here are the screenshots of the lab application: Android Emulator - Nexus_6_API_25.5554 23:35 RandomNumberService Application Random Number Service Home START SERVICE STOP SERVICE Android Emulator - Nexus_6_API_25.5554 3:35 RandomNumberService Application Random Number Service Home START SERVICE STOP SERVICE Text Merged Manifest Android Monitor Emulator Nexus 6 API 25 Android 7.11. AP12 com.example.jhel.randomnumberserviceapplication (223) logcat Monitors Build Variants 09-15 15:31:40.649 2623-2823/com.example.The.randomnumberserviceapplication I/Randomlumber Services In OnStart Command Thread ID is 1 09-15 15:31:49.852 2823-10206/com.example.jhe 4. randomnumberserviceapplication 1/Randomblumber Service Thread TD 1a 119, Random number 13 45 09-15 15:31:50.853 2023-10206/com.example.The randomnumber serviceapplication 1/Randomlumber Services Thread ID i. 119, Random number is 62 09-15 15:31:51.655 2823-10206/com.example.jhet. randomberserviceapplication 1/Randomblumber Service:: Thread ID 1 119, Random number is 49 09-15 15:31:52.855 2223-10206/com.example.jhe 4. randomberserviceapplication I/Randomblumber Service Thread ID 1. 119, Random sumber is? 09-15 15:31:53.857 2823-10206/com.example.jhe 4. randomberserviceapplication 1/Randoblumber Service:: Thread ID 1= 119. Random number 13 84 09-15 15:31:54.95 2223-10206/com.example. The 4. randomberserviceapplication I/Randomblumber se lication I/Randalumber Services Thread ID : 119, Randon number is 70 09-15 15:31:55.858 2023-10206/com.example. The 4. randomnumber serviceapplication 1/Randoalumber Services: Thread ID 18 119, Random number 1885 09-15 15:31:56.860 2023-10206/com.example.jhe. randomnumber serviceapplication 1/Randallumber Service Thread ID 18 119, Random number is 92 09-15 15:31:57.861 2823-10206/com.example.The.candomber serviceapplication 1/Randallumber Services Thread ID 1a 119, Random number 1a 57 wortes Run 2 TODO Android Monitor Terminal Messages Instant Run applied code changes and restarted the app. // (Don't show again) (minutes ago) Tot Merged Manifest Android Monitor Emulator Nexus 6 APL 25 Android 711 APL com.example.jhe randomnumberserviceapplication 223) loga Motors 09-15 15:33:08.932 2023-10206/com.example.hel.randomnumberservice application I/Random e r Service! ThreadID IN 119, Random number is 31 09-15 15:33:09.933 2023-10206/com.example.ghet. Tandenb ervice application t/Random er Services! Thread TD 18 119, Random number 1945 09-15 15:33:10.9342423-10206/com.example.hel. o berservice application I/Randomber Service!! Thread ID 18 119, Random number is 09-15 15:33:11.935 2625-10206/com.example.The.randomberservice application 1/Random er Service Thread ID 13 119, Random number 1976 09-15 15:33:12.937 2023-10206/com.example.jhe n berserviceapplication I/Randomber Service Thread ID 119, Random number is 76 09-15 15:33:13.937 2823-10206/com.example.The. Tandem berserviceapplication I/randomlumber Service!! Thread TD 19 119. Random number 13 26 09-15 15:33:14.930 2625-10206/com.example.hel.randomnumber service application I/Randomlumber Services Thread ID : 119, Random number is 30 09-15 15:33:15.939 2623-10206/com.example.The.randomnumberserviceapplication I/Randomdumber Services Thread ID 18 119, Random number 1991 09-15 15:33:16.941 2623-10206/com.example.hel. Tandem number serviceapplication 1/Randomlumber Services Thread ID 1 119, Random number is 09-15 15:33:17.414 2823-2523/com.example.The random service application 1/Randomber Services Service Destroyed. Run TODO Android Monitor Terminal Messages Instant Run applied code changes and restarted the app. I Don't show again) 0 minutes ago) W DTP

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions