can i turn off fast app resume on back button click - c#-4.0

i have a windows 8 phone application, i would like to stop the app from fast resume when the user selects the back button after they have navigated away from the application. the nature of this application is that it should start afresh every time - just like when the user clicks on the applications tile.
i know there is the activationpolicy setting in the application manifest, however this is for the reverse purpose - enabling fast resume like behavior when the user selects the application's tile.
tia

Apps can only choose to participate in Fast Application Switching or Fast Application Resume. Developers can't pick and choose which pieces of behaviours work best for them. So you should choose the scheme that works best for your app using the ActivationPolicy in WmAppManifest.ml.
You could potentially catch the OnBackKeyPress event and invoke Application.Current.Terminate() if the backstack is about to be empty. I'm not sure if this violates any certfication guidelines or not, but Microsoft is very sensitive to back button usage and application lifecycle.

If you’ve seriously thought long and hard about why your app should deviate from the norm and start afresh, then I would just clear the backstack on app resume.
Application_Activated
while (RootFrame.RemoveBackEntry() != null);
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj735579(v=vs.105).aspx#BKMK_Howtoclearthebackstack

Related

Detecting when a user is away outside of the browser

I am building a "status" stand alone application customized specifically for my company. In my app, a user will open the web site and update his/her status to one of several buckets (away, at my desk, out of office, etc) and THEN the user will most likely minimize the application. My issue is how to detect when a user is away if they are not navigating within the status application browser window. If a user were only navigating within the app, detection is easy-
#HostListener('mousemove', ['$event'])
However, I need a solution where I can detect desktop inactivity and then (after 15 minutes) update the user status to 'away' in the database.
I am early in the development process, and am open to a different approach. The technologies I am using is Angular 8, Node js API, and Postgres SQL. Ideas?
EDIT: From the comments, I understand that communicating with the desktop is not possible. So at this point I am hoping on high level ideas on how to architect this while achieving similar results described in my post. tcp/ip socket that updates user status from the api if the connection is broken when a desktop enters sleep mode? Any crazy ideas?

Prevent from screen recording

I am working on an educational e-commercial website .. In which the user need to authenticate and then the videos on particular topics will be available.. so how can I prevent my video to be screen-recorded...
Different OS's and applications support different mechanisms to try to tackle this - for example:
Microsoft Edge on Windows 10 uses integrated 'Protected Media Path' for encrypted content which will stop simple screenshots working
Website and web app developers may use a number of CCS 'tricks' to achieve a similar affect, although these can usually be workaround with standard web developer and debug tools.
Mobile video typically uses protected memory for encrypted content which will usually give a black screen on capture.
As mentioned in comments and other answers these are all 'barriers' but they don't make it impossible to copy the content - the best example being pointing a camera at the screen a copying that way.
The idea is generally to make it hard enough compared to the value of the content so that people are not prepared to invest the time to work around your barriers.
It is not possible, for a variety of reasons:
There is no Web API for that.
Even if there was, it would be possible to reverse engineer the browser/OS to allow for screen recording.
Even if, for some reason, you couldn't access and modify the software running on the computer, you could connect the computer to a capture card instead of your monitor.
And if you also couldn't do that, you could just point a camera at the screen and start recording.

windows phone out of memory exception

I am developing windows Phone application. In my application am using Longlistselector and loading long lists with images using MVVM. Also in the details page after lists there are few high res images.
In my application am going from Page 1 to Page 2 and page 2 to page 1 n number of times.
Application is crashing in back navigation giving ArgumentOutOfRangeException and OutOfMemoryException.
I have done the Windows phone application analysis. Its showing GC events are getting called frequently. However it does not show at what point application crashes and how to reduce or how to clean up memory used by application.
If anyone knows about memory cleanup and how to prevent memory leaks please let me know.
The biggest gotchas for memory leaks are event handlers not being released. Whenever you subscribe to an event, you also need to unsubscribe the event when the updates are no longer needed. I'd guess that your page 2 isn't actually going away when you navigate back to page 1.
I believe there are a pair of overloaded methods (OnNavigatingTo and OnNavigatingFrom, I think) that can help you manage this.
Another way is to use a WeakReference and manually pass along any data with an EventAggregator. Probably the easiest one to use is part of the MVVM Light Toolkit (the Messenger). This Weak Reference won't have your event senders hold references to your subscribers.
You also have to remember that windows phone is a new paradigm. You do not navigate from page to page, but rather to a page and back to the previous page. If you are going forward all of the time, you will have new instances of the pages in the navigation stack.

send sms j2me appear promt message

When I am sending sms via j2me application, before message sent it appears question for can I use internet to sent message. Is it possible to exit this question to not appear?
This is happening because you Accessing HTTP & SMS API. For using such API you need to signed your Java ME Application. For Signed a the Java ME Application, you need to purchase Signing Certificate from VeriSign or Thawte Site by paying the Fees.
Plesae visit this link
For VeriSign's certificate, they costs 20K per certificate.
I think you can skip the prompt but your application must be signed. However, even if your application is signed, on some devices, the prompt will still appear once. This usually (or always) occurs on the session's first use of the Wireless Messaging API. This happens because the access to this API is set to something like "Ask first time."
If your app is signed, you can manually set the access to the wireless network settings to (something like) "Always allow." If it is set to (something like) this, the prompt will not appear.
For apps that are not signed, the option "Always allow" is not available. However, on most devices, the next best option is available: "Ask first time."
Well, the bad thing is, you are going to set it manually. The good thing, however, is that you are not going spend so much money just to set it to "Ask first time." :D
J2ME by the platform design have the drawbacks in which users of the applications are asked to select yes or no for any attempt to use any of the secure API's. Some devices gives this alerts in such a way which will make the end user to think if he should go ahead or stop it there. By digitally signing the application, one can reduce the alerts to levels depending on the device KVM implementation and the number of secure APIs in use.
In some device having Symbian OS Feature Pack 1, the prompts continue even if the code is signed.
This behavior of J2ME makes the applications less developer friendly and less user friendly. I think this is a wrong strategy and model adopted by SUN. There is some thing called Verified by Java in which you can get your application signed using a certificate which will make the application work seamlessly and without prompts in the end user device but unfortunately the process of getting that certification is expensive and not practical. The only advantage of J2ME platform is that it allows less chances of virus or malware code to be executed on the end user device. I think the trade off between security and ease of user use is not worked well and that is the reason we don't see very good apps in J2ME.
In contrast, Android for example, lets the user see all the permissions prior to installation of the app and the user is not bothered at run time when those secure API are used. That is the reason we see millions of apps there and not in J2ME. We can always say this approach had led to many malware types of applications in the end android user device but that is how it goes, people need to have smooth apps running and are happy with them.

EventInjector on BlackBerry to close the camera - security threat?

we are using the native BlackBerry camera in our app, using the Invoke class to start the camera. We listen for an image being written to the filesystem, and when the user is finished with the camera, we call
Application.getApplication().requestForeground();
inside fileJournalChanged() to get back to our app.
This caused a problem with the camera lingering on the image taking on some devices, some of the time. If you want gory details you can see my post on the BB forums from a while back.
http://supportforums.blackberry.com/t5/Java-Development/restore-invoked-camera-after-deleting-an-image-from-the/m-p/511332
Suffice to say, I am still trying to fix this. Using EventInjector to inject an ESC key press works, however in this question
Getting Event Injector Permission
it is described as a security threat. However this is widely suggested as the way to close the camera and work around other issues. Has anyone had problems using this method to close the camera or to do anything else? Is there a better "best practices" method for closing the camera, as there apparently is in Android (I don't actually know, a senior developer here mentioned it)?
By "problems" I guess I really mean business rules types of problems... app getting blacklisted by an organization, slammed in the app store, etc?
Thanks in advance, this has been troubling me for a while.
I think the biggest problem you'll face is that using event injection requires special application permissions - ApplicationPermissions.PERMISSION_INPUT_SIMULATION to be exact. Since granting an application this permission basically allows it to simulate input events into ANY application at any time, it is considered quite dangerous because a badly-written or intentionally malicious application could do a lot of damage. Therefore many end-users and business do not allow applications that require this permission.

Resources