Python program that runs based on iPhone?

I want to write a program that makes my phone shut down/sound an alarm/anything when I plug it into my computer or anything else with a USB port. If not python it doesn't really matter, I know java and c++ also.

Why does my iPhone die when I run apps while on the charger?

I have an iPhone 4. I just noticed it today when I was using an alarm app. When I went to sleep my phone was charging and it was on 78%. When I woke up it was on 4% and it showed it was still charging. Later that day I let it charge to like 50% then started played some games. When it reached 20% and the noticed popped up, I plugged it in and it started charging.About 5 minutes later, The notice popped up again saying I had 10% left. I really have no idea what's going on. I don't have the original chargers that came with the phone. I lost em… Ehehehe. I have a black apple cord and a glow in the dark wall plug.

I also got the phone about 2-3 Weeks ago.
Does anyone might know what's going on?

Music downloader for iPhone4

Please! I need a REAL music downloader for iphone4. I have cydia and yes i had music box but it stopped working and i just really need a FREE MUSIC DOWNLOADER FOR IPHONE. Please? Anybody?

Why am i not getting any notifications?

I'm not getting notifications on my iPhone and I don't know why? My notification center is turned on but I still don't get the notification from kik or snapchat. But when I open snapchat up and refresh it I have snapchats from hours ago. Same with kik, when I open it, I have kik messages from different people that I never got a notification for.

No LTE on unlocked iPhone 5?

I have the latest carrier update, I have iOS 7 developer beta. I have the enable LTE option, but nothing happens. Only 4G. On cellular data settings I have fast.t-mobile.com written, but the LTE section is fully blank. I tried writing fast.t-mobile.com there, nothing happened. How can I enable LTE?

Should I sell my iPhone 5 and get the S4?

I heard the Samsung galaxy s4 is way better than the iPhone 5. Should I sell my iPhone 5 and get the Samsung galaxy s4 and get an iPod touch instead, or just keep my iPhone 5? I was trying to jailbreak my iPhone 5 as well but it's not working. I really want to customize it and add ringtones.

How to un update an application

Please help I'm stuck with this new version of my app and I absolute dislike it I liked the old version a lot better! Does anyone have any idea how to downgrade the app? Without jail breaking of course… Oh and I own am iPhone 5.