I need to make some url request when my application goes to background
I'm developing with the simulator and I've just noticed that when I press the power button to lock the screen the appDelegate method
- (void)applicationDidEnterBackground:(UIApplication *)application
with iOS 5 is automatically called, but this doesn't happen with iOS 4
is it right? can someone try if on real devices there's the same result?
is it possible to detect the power button pressure and differentiate the actions from the home button pressure?
thank You!
Yes, this is correct.
Take a look at the "Adopting Multitasking in Your App" in Apple WWDC 2011 videos.
You can use beginBackgroundTaskWithExpirationHandler: to do your requests.
Related
I'm developing a Web Application on Tizen. My application was first developed on other platforms like iOS and Android.
Basically it starts on Landscape mode and plays remote content such as image, video or opens a web page. It has a menu inside the app to offer people the ability to change the screen orientation inside the app manually.
This approach is quite easy on iOS and Android but on Tizen seems it doesn't work that easy.
I'm following Tizen's official documentation which send's us to : https://w3c.github.io/screen-orientation/
But, can't make it work even though I followed steps written on the link above.
This is what I got when I try to rotate:
Trying with :
screen.orientation.lock('portrait-primary')
Error :
Promise {}
index.html:1 Uncaught (in promise) DOMException: The page needs to be fullscreen in order to call screen.orientation.lock().
P.S. The app is already in fullscreen. The error is not relevant.
Do you have any ideas ?
Thank you
For all to those who are still trying to achieve this:
After having a long discussion with Samsung, they claimed that supporting the TV orientation via code is not possible right now (Not sure if it's gonna be implemented in the future).
These restrictions come due to different operability of the hardware components on different orientation.
The only way to rotate your screen is to do it via Samsung's TV Settings so that it can prepare its hardware for the chosen orientation.
There are a special Samsung TVs for Advertising market (Digital Signage series) that are ready to set the orientation of the screen.
I comercial Samsung TV sets Tizen is not able to rotate some kind of elements (as far I know the video object are one of the HTML elements that cannot be rotated)
I've developed some apps for Tizen and for one customer I tried to make a video wall but it was impossible due the firmware limitation of Tizen (it's a marketing strategy in order to avoid having hotel and digital signage capabilities in commercial TV sets)
I have a problem in background processing I am working on app which needs to run tasks periodically to update content or download some files. I tried PushRegistery, but it launches UI (My App Midlet) however this tasks doesn't need to UI.
Simply I need to use something like Android Background Service and IntentService. Is that supported in Nokia Asha SDK or not and if not I am asking if there is a workaround to do that.
Also I every time app launched permissions prompted to use. How can I prevent that ?
I am working on device Nokia Asha 501
Standard JavaME doesn't offer any way of making background MIDlets.
But some phones lets you do Display.setCurrent(null); in order to hide the GUI and show the phone UI instead. I've seen it work on Sony Ericsson phones, but I'm not sure if it works on Nokia devices. (I don't think so).
With the Asha models, Nokia introduced a whole set of new API's though, so maybe you can do it using one of those. I haven't been able to find any such option myself though.
As for the permission prompts, there's sadly only one way to get rid of those, and that is to sign your MIDlet with an expensive certificate, for $299 - each year...
A few phones lets you manually set the security settings though. I've seen this too on a few Sony Ericsson phones, where you can set stuff like "Only ask once" or "Never ask" for certain operations like "Camera access" and such. Don't think Nokia offers such options though.
Finally, it's possible to patch / hack the phone to kill the JavaME security. But again, I've only seen it on Sony Ericsson phones, and I don't know of any way to do it with a Nokia phone.
So I'm afraid you need to look into signing.
After i had successfully ported the app. the app is running fine and taking touches on native ios nibs files where used for dialogs. But it is not taking touches on menu items.
let me explain this. It has some different view of axis. like tap on somewhere on screen will open some other menu which was not tapped. it seems it is taking touches but opening the desired menus but the location of buttons are not proper..
I had similar. In my case I had implementation of touchesBegan,touchesMoved and touchesEnd in View class with calling super. On iOS it works fine and messages going directly to controller. With apportable SDK it does not work. Maybe you have the same situation.
I'm trying to figure out whether or not I can register/call notifications in the symbian OS that's fit for the S60 series, using an app, that interrupt the OS and appear on the dashboard screen, the same way incoming calls and text messages do.
If so, is it just a basic alert, or can it contain a context menu (on either side) with options relating to the app?
I appreciate any help on this issue, as it'll determine whether the app is even feasible at all.
Thank you
If you need to pop up something on top of the home screen, that is perfectly feasible - a Window in a WindowGroup with the right priority will do (I've done this before). As such, this could have a menu, or whatever you need.
You don't say what events you need to hook on to when displaying this screen?
I'm pretty new to IOS4 audio/multitasking and i cant find an answer on this topic:
Got a, pretty easy, two part question:
What framework works in conjunction with the ipod framework? Everyone's seen the pandora app, so the question is:
How do you get the app to notify the user that music is playing (via the purple play icon in the status bar)?
How does this become controllable via the multitasking control bar (ya know, the ones right next to the lock-aspect button)?
It's all the same process.
The play icon is added when you successfully link up your app with the remote play controls (remoteControlReceivedWithEvent). The controls are just events that are channeled to your remote control aware app.
TYPE of audio doesn't matter, as far as i know (MPAudioPlayer doesn't work in the background though).
Hope that helps the newer coders out there :)