GSoC/GCI Archive
Google Code-in 2011 OpenIntents

Prevent screen lock while running OI Shopping List

completed by: Florent Revest

mentors: Peli

The task is to add an option to OI Shopping List to disable the automatic screen lock while running the app. While in a shop, users want to leave their OI Shopping List application open to tick items off as they put them into their shopping cart. This new setting will allow the user to leave the shopping list open, even when not interacting with it for a while. This task is based on a Uservoice feature request.

In order to implement the change, you first need to add an option to res/xml/preferences.xml to "Disable screen lock". You need to add the PowerManager to ShoppingActivity in order to control the wake lock. If the setting is turned off, the wake lock should be removed.

Your solution should consist of a patch (instructions) based on the latest version of OI Shopping List. If you don't have it yet, you first need to download and install the Android SDK (instructions). Follow these instructions to build OI applications.

  • Difficulty: easy
  • Time limit: 14 days
  • Computer language: Java
  • Prerequisites: Download the Android SDK (instructions)
  • Requirements for completed entry:
    • Send in a patch with your code modifications (instructions).
    • The code must follow our StyleGuide.
    • OI Shopping List must have an additional preference "Disable screen lock".
    • This option must disable the screen lock of the application.