Questions tagged [android-1.5-cupcake]

Android 1.5 (Cupcake) is a significant platform release deployable to Android-powered handsets starting in May 2009

Android 1.5 (Cupcake) is a significant platform release deployable to Android-powered handsets starting in May 2009

See platform highlights. They include:

For more information, see the tag.

36 questions
215
votes
11 answers

How do I find out if the GPS of an Android device is enabled

On an Android Cupcake (1.5) enabled device, how do I check and activate the GPS?
Marcus
  • 8,601
  • 4
  • 24
  • 24
109
votes
13 answers

Creating an Android trial application that expires after a fixed time period

I have an application which I want to hit the market as a Paid app. I would like to have other version which would be a "trial" version with a time limit of say, 5 days? How can I go about doing this?
Tom
  • 7,316
  • 9
  • 35
  • 35
94
votes
6 answers

Android: How to use AlarmManager

I need to trigger a block of code after 20 minutes from the AlarmManager being set. Can someone show me sample code on how to use an AlarmManager in ِAndroid? I have been playing around with some code for a few days and it just won't work.
Tom
  • 7,316
  • 9
  • 35
  • 35
33
votes
3 answers

Disable noise cancellation for microphone in Android (1.5)?

Is it possible to disable noise cancellation for the microphone in Android (specifically 1.5) via code? I want to create a dumb MicrophoneApp that records all the background noises, but I believe that noise cancellation for the microphone is getting…
Dan
  • 121
  • 1
  • 2
  • 4
28
votes
7 answers

How to programmatically enable GPS in Android Cupcake

I'm currently writing an app in Android that works with the GPS. At the moment I'm able to work out whether the GPS is enabled. My problem is that I want to enable the GPS on app startup if it is disabled. How can I do this programmaticaly?
Chiwai Chan
  • 4,716
  • 4
  • 30
  • 33
12
votes
3 answers

Killing android application on pause

I have an application which I would like to be fully disabled/closed when it is paused (IE. When the user presses the Home, End (call) and Back button I would like the application to be closed, instead of being saved in the history stack). How do I…
Tom
  • 7,316
  • 9
  • 35
  • 35
11
votes
4 answers

Android Screen Timeout

I know its possible to use a wakelock to hold the screen, cpu, ect on but how can I programmatically change the "Screen Timeout" setting on an Android phone.
Tom
  • 7,316
  • 9
  • 35
  • 35
10
votes
2 answers

How to time-bomb an Android application?

Hello does anyone have a code example of how I can time bomb an Android application so It will not work after a given date? I would like to release a "beta" application for testing but would like to make sure it will only work while the application…
Tom
  • 7,316
  • 9
  • 35
  • 35
7
votes
4 answers

Possible to only load specific lines of code according to Android OS version?

Is there a simple line of code that would allow only loading the code if the OS version meets the requirements? Lets say I have my target OS as 2.2 but the min sdk is 3 for android 1.5 so even if i have some code in my project that isn't compatable…
brybam
  • 5,009
  • 12
  • 51
  • 93
7
votes
4 answers

AlertDialog MultiChoiceItems Listener problems

I am currently using the AlertDialog.builder to create a multichoice list for the user (checkboxes). This works great, except we want one of the buttons to deselect all of the others in the list. builder.setMultiChoiceItems(list, checked, new…
Ty Smith
  • 2,594
  • 2
  • 23
  • 29
6
votes
2 answers

Using a wakelock in a service Android 1.5

Hello I am trying to use a service to control a wakelock so I can permanently leave the screen on when my application is running. I create the wakelock and activate it in onCreate() and release it in onDestroy() however I get the error "wl cannot be…
Tom
  • 7,316
  • 9
  • 35
  • 35
6
votes
2 answers

Preventing application/screen timeout Android

I have an Android (version 1.5) application which needs to be constantly running when a button is pressed. So, when a Button is pressed I would like the phone to remain on and not want the screen or CPU to time-out. When another Button is pressed I…
Tom
  • 7,316
  • 9
  • 35
  • 35
5
votes
1 answer

Android animated GIF (Cupcake)

I've used animated GIFs in Android pre cupcake however my old code no longer works. To be exact: Movie.decodeStream Always returns null... Does anyone have any workarounds/fixes to play animated GIFs?
Dawson
4
votes
1 answer

Is there a way to raise the backlight on an Android device through the official API?

What I've read seems to indicate that the only way to do it is to use unofficial APIs that are being locked down in Cupcake (1.5). Is this true?
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
4
votes
5 answers

Cake Comparison Algorithm

This is literally about comparing cakes. My friend is having a cupcake party with the goal of determining the best cupcakery in Manhattan. Actually, it's much more ambitious than that. Read on. There are 27 bakeries, and 19 people attending (with…
dreeves
  • 26,430
  • 45
  • 154
  • 229
1
2 3