Service is run once... then never again - xamarin

I created my app as I wanted a widget to display some status text on my home screen. Upon adding the widget to to home screen it updates to never update again... As a workaround I've added click event to the widget, so the click triggers the update of the widget - but that also dies, in order to fix that I have to open the application, go to my home screen en tap the widget and it will update. After a couple of minutes it does not respond to clicks again. And it never updates the widget by the set interval (updatePeriodMillis).
I've not put my app in the list of application that the OS will sleep.
Anyone have a clue?

Related

Xamarin Forms Button Released not triggered if you move the finger a little while the button is still pressed

I have a problem with Xamarin.Forms.Buttons. I want my app to execute an action when the user presses the button, and a different action when the user releases it. The problem is that once you have pressed the button if you move the finger(while you are still touching the screen), the released event will never be triggered even when you release the finger. When you move the finger, the button makes the animation like it was released/lostFocused but the "Released" event is not triggered. If you press and release again the same button without moving the finger, both events are triggered.
I would like always to know when the user has finished pressing a button.
Is there a way to make the "Released" event trigger in that situation?
Can I make the button has a "IsPressed" property or something simillar, so I can check it?
Can I check for example a "Screen.IsPressed" to know that the whole screen is not touched anywhere?
Thank you very much in advance.
If I make a new project with a simple button, I am not finding that problem either. In the project that I have the problem, my button is part of a ViewCell that is part of a ListView. Maybe that is causing the problem. By the way, I was able to solve the problem using a CustomButton.
https://forums.xamarin.com/discussion/comment/423607#Comment_423607

What is the hype around the Windows Phone 8 back button?

I know how to implement the back button. My question is about the desired behaviour (as I experienced there is a hype around it that the good implementation of back button is required to sell the app in the store).
There is the official source:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402536(v=vs.105).aspx#BKMK_BackButton
But I have never used a WP8 for more than 5 minutes. I understood that the "Windows" button/key is the same as android home and ios home buttons. Is it true, that the WP8 back should be the same as the android back? (Briefly navigate back through pages (screens/activities), dismiss alerts or cancel confirm popups, or if it is the first/only/final page/activity, the app should exit.)
As I experienced, there is a long-press on the back button, which brings up the app switcher (~ios double home). Is it true that I should not take care about of this button? Is the default behavoiur the same for the remaining buttons (windows, power off, camera (half and full), search)? Should I override them? Can I override them (I think I can use camera, but can I use volume controls for other purposes)?
The certification requirements lay out what the back button should do pretty well. In short, it sounds like how you described the Android back button - here are the relevant requirements:
(5.2.4.1) Pressing the Back button must return the app to the previous page or return to any previous page within the back stack.
(5.2.4.2) Pressing the Back button from the first screen of an app must close the app.
(5.2.4.3) If the current page displays a context menu or a dialog, the pressing of the Back button must close the menu or dialog and return the user to the screen where the context menu or dialog box was opened.
You don't have to handle triggering the long-press, nor do you need to handle navigation specifically (assuming you're using the NavigationService for page navigation.)
You can definitely override the camera button, but search, power, and volume are off limits.

Sencha Touch 2.x clicking on button but moving pointer before releasing mouse button doesn't work

I hadn't really seen this as a problem until my client mentioned that the majority of his clicks on buttons on the app I'm developing do nothing. I enquired a little about what exactly he was doing and it turns out that he was clicking (using a mouse, this is a sencha touch app that is embedded inside of a windows application and will ultimately be running on a windows 7 UMPC 'tablet') on a button and releasing BUT the pointer had moved between the click and the release (by a couple of pixels). However this seems to not trigger the tap handler for the button. The only way it works is if you click and release in the exact same spot with no dragging inside of the button at all.
I think thats a little odd - clicking and moving the pointer and then releasing, all while still inside of the button - should trigger the event handler IMO. Clicking, moving and releasing OUTSIDE of the button shouldn't (which it does, as expected).
Anyone else experience this or know of a way to counteract this behaviour?
Thanks
Turns out that this only happens when the app is hosted within WebKit.NET browser control - if I just run it within Chrome the click behaviour is fine - can click and move the mouse and release (while inside the button) and the onTap event fires fine.

WP7 App Events in Emulator

I'm seeing some unexpected things happening in the emulator.
When debugging and starting the app for the first time, the Application_Launching fires just fine. When clicking the start button, the Application_Deactivated event fires fine. When click the back button, the Application_Activated event fires fine.
If I click the start button then go to my apps and launch my app, no events are fired. I would assume either the Application_Launching or Application_Activated would fire when the app is launched every time, just a different event depending on how the app got there.
Is this an issue with the emulator or do I have the wrong assumptions here?
Well, the events get fired right. What you missed is that debugger get dettached when you are launching "new instance" of your app. ;)

Why does Application_Deactivated not get called on a pivot page?

For my Windows Phone 7 app, I have a main panorama page which opens up into a pivot control. The main panorama page correctly calls Activated/Deactivated, and restores correctly.
But after visiting the pivot page, pressing the Windows key doesn't call Deactivated.
When the app is relaunched with the back button, it goes right to how the page looked before tombstoning, but Activated is not called, and the page is not usable, and the back key doesn't work.
Has anyone else experienced this problem before?
If you just go to the Start screen then your application MAY not get tombstoned. This is expected behaviour.
If you open another application or open search from within your application you should experience tombstoning.

Resources