I need to port an Android app which has a widget to WP8.
In Android the widget shows a countdown which is updated in the background automatically - even when the user has quit the app.The countdown starts at a certain pre-programmed time and just counts down - all donw without the user having to start the app in Android.
Is there some kind of similar functionality on WP8 with the tiles?
The app does not interact with internet and does not receive any external messages like email that can cuase the countdown to work. It needs to all happen automatically.
This is not possible in WP8 (or WP7).
At best you can update your app's tile on the homescreen once every half hour (best-case!). It sounds like you want to update more frequently than that.
Related
I’m currently developing a timer app for android and iOS. I really care more about iOS for the time being, and even after following Xamarin’s documentation on backgrounding, using messaging center calls to the appDelegate.cs class and then launching a background task with the platform specific code, I’m still having my app terminated.
Is there any way to put an iOS app as a foreground service, like on android. Or is a background service still the way to go? I am trying to allow the user to set a timer up to 23 hours in advance and show count down.
To those interested, another strategy I found was just setting a notification to go off, regardless of if the app is running or not. Then, you can just handle persistence instead of trying to make the app keep running!
Good luck to everyone!
I'm creating a timer in C#. When the timer finishes the user will get a notification.
If my app is gets suspended, I schedule a notification with the ToastNotificationManager and in the toast XML set the sound to an internal sound, e.g.:
<audio src='ms-winsoundevent:Notification.Looping.Alarm10' loop='true'/>
However if my app runs in the foreground I don't want to schedule a notification, but just play the sound with the BackgroundMediaPlayer.
Of course I want to use the same alarm sound, as in the notification. But I haven't found a way to address the internal sounds there.
I've found this:
BackgroundMediaPlayer.Current.SetUriSource(new Uri("ms-appx:///Assets/Sounds/alarm01.wav"));
BackgroundMediaPlayer.Current.Play();
But this would require me to copy all system sounds to my app and I don't want to do that, since it would increase the size.
I've created a demo to reproduce the problem and found that you can use the internal sound directly by using
BackgroundMediaPlayer.Current.SetUriSource(new Uri("ms-winsoundevent:Notification.Looping.Alarm10"));
BackgroundMediaPlayer.Current.Play();
It worked in my UWP Project. I hope it will work in your Project too.
I would like to create an app which would pop-up fullscreen when user is not interacting with the device; the first tap would then close it. So it's exactly like a screensaver. It should "run" 24/7. Display should always be lit. Battery is of no concern.
I've already done this on android, but my WP skills are lacking and complete research would take me at least a couple of days, so I'm asking any WP gurus out there:
can the same functionality (screensaver) be achieved on the Windows Phone 8.1 platform?
If so, which are the basics that should be covered (programming-wise)?
Edit:
The only solution I have at this moment is changing the LockScreen background on a 30minute interval.
I'm still not sure whate happens in 2 weeks as some info suggests that the registered task will expire. Not to mention that LockScreen is shown only a few seconds.
Edit 2:
Subquestion: is there a way to keep LockScreen shown at all times (while charging)? Or maybe lauch lock screen from code?
Windows Phone doesn't usually allow apps to pop up on their own. Exceptions are made for specific usecases such as voip. There is also no way for an app that isn't running in the foreground to realise that the user hasn't interacted with the screen for any number of minutes.
Therefore your only option is to use the inbuilt lockscreen functionality.
I have created a Window phone 8 app. Which changes the lockscreen image and notification in around 30 sec randomly.
My code works well in the emulator and device. When I install it through the code. My problem is that when I have submitted the app to the store as a beta app. And now I install the app from the store the app don't work as it was working. The lockscreen content don't change it remains static. I have checked the settings background agents that app is running in the background tasks but not showing the result.
What could be the cause that app is running well from the code but not from the xap uploaded to the store.
Link of app is http://www.windowsphone.com/s?appid=00d47e34-a551-4c98-b2a6-32e10babdc2f
am I missing any capability that need to fixed.
Your suggestions are welcome.
Because your title says you are using a background task and you are trying to do something every 30 secs, I assume that you're using ScheduledActionService.LaunchForTest to trigger your background task and which then performs the updating.
ScheduledActionService.LaunchForTest is only supported in DEBUG builds as a way to aid testing. It is not possible to submit an app to the store that is built in DEBUG mode so this will not work.
It is not possible to create an app which will update so often in the background. To have such an app would, potentially, drain the battery really quickly and so provide a very poor experience to users.
The best you can do is to have the background agent run on a periodic schedule (approx. every 30 mins) or trigger the updates via push notifications. (But this wouldn't work for the lock screen image.)
I'm developing WP application, part of which is to play/stream audio files.
I didn't wanted to create my own page to display info of current playing track, so I decided to use Built-in Music's player, using Microsoft.Xna.Framework.Media.MediaPlayer class I created playlists and queued playback. It all works fine, but now I need to navigate to MusicPlayer, when user taps on track in my app, and that's the part I've no idea what to do.
I've tried to navigate to MusicPlayer using Microsoft.Phone.Tasks.MediaPlayerLauncher, but it's not an option, because it...
Needs to receive media location in IsolatedStorage, which means
streaming is impossible
Gets one media at a time, so no playlists
I guess I can't navigate without changing track(or starting over)
Is there any way to navigate to Built-in Music Player's Now Playing page, without interrupting playback?
I think these questions might be helpful/related to what you're looking for:
Detecting and launching an external application from within a Windows Phone 7.1/7.5 application
Launching other applications in Windows phone 7 Programatically
In short, it doesn't seem like third-party apps have permission to access other apps on the phone, probably for security reasons.