0

I am working on a project in which I want to assign an images to each month, so that when using this application, the iPhone wallpaper changes when the month does.

The assignment of the images and their storage in a database is complete. How do I set the wallpaper when the month changes? This is the remaining problem. I think that the process should run in the background by using NSTimer. Is this correct or not?

If it is correct, then how do I write the code for that? If it is wrong, then what is suitable for changing the wallpaper? Please provide information for that.

jscs
  • 63,694
  • 13
  • 151
  • 195
Venkat1282
  • 49
  • 1
  • 5

2 Answers2

2

Are you sure that you are able to change the wallpaper through the app? I thought this wasn't possible?

Regardless, NSTimer won't help you because you would have to ensure that the app is running full-time, which is not possible on the iPhone. When the app goes in the background there is no way to know how long it will stay resident, as the operating system will kill it off if it needs to reclaim those resources.

In fact, the only way to mimic this would be to check the current date at startup and then determine if anything needs to happen.

sosborn
  • 14,676
  • 2
  • 42
  • 46
  • Yes sir,First it check the current date.If image was assigned to this date then it will set as wallpaper.If there is no image then it check for this week image or this month image.And set that image.Please Provide me If there is a chance to to set image as wallpaper programatically – Venkat1282 May 19 '11 at 05:17
  • Sir,NSoperation and NSoperationQueue are useful for this? – Venkat1282 May 19 '11 at 05:18
  • 1
    As others have answered in your other questions, there is no way to change the wallpaper programatically. – sosborn May 19 '11 at 05:18
  • There should be a link by each answer that says "Accept". Just click that and the answer should be accepted. You can only choose one answer per question. – sosborn May 19 '11 at 05:23
  • Only link,edit,flag available after Answer – Venkat1282 May 19 '11 at 05:37
  • sorry, there is a white checkmark with black outline. Click that and it should turn green. – sosborn May 19 '11 at 05:59
  • Ok thank U sir.Nsnotifications are useful for My Application? – Venkat1282 May 19 '11 at 06:06
  • 1
    No. Like I said, the only thing to do is check the date on startup and then do whatever you need to do based on that. It is a very simple function that does not require anything difficult. – sosborn May 19 '11 at 06:16
1

This is the answer

Hardware restriction from apple so cant be done by any class or method present in the iPhone library.

Radix
  • 3,639
  • 3
  • 31
  • 47
  • Please give me clear information why we can't set the wallpaper for iphone using my appliction.My application working process is first we assign the images to months and store that information in database.And when month changes automatically changes the wallpaperfor iphone.I think we perform the background process.if we use the background process then which one is best suitable for perform the background process. – Venkat1282 May 20 '11 at 04:08
  • yes i know that i have read itn your quest, see the thing is for some security reasons apple does not allow the developers to access some of its hardware part that's a restriction imposed by Apple Inc so any third party library or any framework in Xcode will not allow you to do that. i hope this helps – Radix May 20 '11 at 08:41
  • Technically speaking this should be allowed but alas its not happening with apple technology. – Radix May 20 '11 at 08:43