Simple Alarmmanager problem

I need some help with my app, I have a foreground service which will run within a range of hours on a daily basis, the start time and end time are set by the user, I'm having a problems and you might be able to help me:

to start the service and stop it at the desired times, I created two services, the main service which will do the main functionality and another service to turn off the first one and scheduled it using alarmmanager to start at the end time that the user has set, so a summary would be:

alarmmanager-->start main service with Interval of one day at the time specified by the user as start time.

alarmmanager-->start the second service with interval of one day at the time specified by the user as end time, this service will terminate the main service in its onStartCommand method, and then it will stop itself with stopSelf().

however i'm having alot of bugs because for example, if the user sets the service to operate from 8 pm to 2 am and applies this setting at 9 pm, both services will start and stop because the time has already passed, but I want the first service to start and stop at 2 am next day in this case, there are a few more problems of the same type, I don't mind changing the way the app works, the main purpose is to let the service run within specific range of hours set by the user everyday.

another problem is that the interface doesn't look the same on all android devices, I'm not sure how to get this done correctly so you might as well help with it.

Skills: Android, Java, Mobile App Development

See more: android alarmmanager, problem summary, android service example, simple mobile hours, mobile problem, android app run service, java interval, android simple java example, java simple example, sure problem, android range, app day type app, simple android example java, android turn phone app, turn phone app android, android app turn phone, simple java android app, simple method java, android app phone turn, simple mind android can export

About the Employer:
( 72 reviews ) Amman, Jordan

Project ID: #4606770

Awarded to:


Hi. I can help you. This sounds like a simple job.

$60 USD in 10 days
(25 Reviews)

12 freelancers are bidding on average $171 for this job


Hi we are interested to developed this [login to view URL] see your [login to view URL] Rashid

$257 USD in 15 days
(38 Reviews)

Hello, I can help you with this project, Thanks

$175 USD in 5 days
(380 Reviews)

Kindly check your inbox. Thanks

$206 USD in 3 days
(162 Reviews)

Respected Client, Please check PMB for listing and confident to complete the project with quality services.. Best Regards

$206 USD in 5 days
(43 Reviews)

Hi, i have fully read your description. Please check pm for my proposal , Thanks.

$200 USD in 4 days
(17 Reviews)

Hi. I can do this. I'm experienced with alarmmanager/receivers/services in Android. I'm ready to start immediately.

$157 USD in 3 days
(19 Reviews)

Hi, Please check your PMB for more details. Thank you.

$155 USD in 5 days
(13 Reviews)

Count me in.

$105 USD in 3 days
(7 Reviews)

- Result oriented professional with 3 years of extensive experience in Software Development. Technical: Languages: JAVA . Database: MySQL ,SQL Server . Web technologies: HTML ,Xml,Servlets,Jsp. Design Pattern More

$155 USD in 3 days
(0 Reviews)

Hi I am very good in Android, Java and other mobile based programming languages. I have been developing android apps for a long time and I would be really happy to help you out.

$155 USD in 3 days
(0 Reviews)

Please check your PMB

$222 USD in 3 days
(1 Review)