Completed

Simple Alarmmanager problem

This project was successfully completed by grede for $60 USD in 10 days.

Get free quotes for a project like this
Employer working
Completed by:
Skills Required
Project Budget
$30-$250 USD
Completed In
10 days
Total Bids
18
Project Description

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.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online