windows phone equivalent of ondestroy() of android - windows-phone

I am new in WP platform. I want to do some operation when user leaves the current page.Where can I write the codes of the operations.Like ondestroy method of android.

Glad to hear you are interested in developing to Windows Phone OS.
Please check this link to examine WP Application Lifecycle:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff817008%28v=vs.105%29.aspx
To answer your direct question: You should override the OnNavigatedFrom function.

Maybe yo can do something overriding "OnNavigatedFrom" and using this.Frame.BackStack.Last() to compare with the current page to know if you go back or not.

Related

How to use the front camera with react-native-document-scanner?

Working on a react-native app, I'm using react-native-document-scanner because I need to detect documents. However I need to switch between the front and the back camera. Is there a way to simply implement that or is there a package allowing it ? (react-native-camera does not suits my needs)
The creator of this package nicely implemented this feature especially for the need of this project. Many thanks to him !
Now the boolean props "useFrontCam" is available.

How to know about app launched and details jailbreak iOS 7

I am making a tweak for iOS 7, in which I want to know about app launch event, and the details of app being launched (name and identifier). So far the only useful framework I have found is SpringBoardServices.framework. The header files which may be/are useful to track app launch event include:
SBAppLaunchUtilities.h
SBLaunchAppListener.h
If I am on right track, can anyone provide me information about their methods usage? There is no relevant information or guide present on iphonedevwiki.
Moreover, How can I get information about app launched? I have studied Andy ibanez's tutorial. It hooks SBApplicationIcon class, which I guess has been removed from iOS 7 frameworks because I can't find it in dumped frameworks. So what is alternate header? Is it SBSCardItem.h and SBSCardItemsController ?
Looking forward for help. Thanks.
You need to look into SpringBoard.app instead of SpringBoardServices.framework. SpringBoard app comes "alone" because like it's extension implies, it's an app, and not a framework that can be found in the entire Private Frameworks.
You can get a lot of info from the SBApplicationIcon class in SpringBoard, such as the app display name and things like that. Check the headers for more info.

How to launch an APP in background in iOS 6.x silently

We want to launch an APP silently in iPhone without bring this APP to the Foreground. In iOS 5.x we achieve this goal by this code:
[(SBApplication*)app setDisplaySetting:0x4 flag:NO];
[(SBDisplayStack*)displayStack pushDisplay:app];
[(SBDisplayStack*)displayStack popDisplay:app];
But, in iOS 6.x there is not SBDisplayStack any more. I did some search but not found any answers. Someone says that SBWorkSpace replaces the SBDisplayStack in iOS 6.x. We use SBAppToAppWorkspaceTransaction to implement but always bring the APP to the Foreground which dose not achieve our goal.
Anyone can help me? Thx!
You can use the SBSLaunchApplicationWithIdentifier() function from the SpringBoardServices private framework. It takes a suspended argument:
SBSLaunchApplicationWithIdentifier(CFSTR("com.company.app"), TRUE);
You'll also need the com.apple.springboard.launchapplications entitlement for this.

How to intercept didStartLoad in web view (metro apps)

I have been developing iOS and Mac OSX apps since years. So, I was pretty surprised to find no method for Windows 8 Metro WebView to intercept when it starts loading a new page, but only when it finishes loading.
Is there really any workaround for this? I could not find anything both in the docs and on the web...
Thank you very much!
Fabio
You can use the Window.External.Notify() method to trigger an event back in your C# or whatnot. You can also use the Webview.InvokeScript() to activate scripts from outside the control. You can write a script as a string outside the WebView and use the WebView.InvokeScript() with "eval" as the first arg to run that script inside the control.
ScriptNotify
This shows how to use both ScriptNotify and InvokeScript

Properties of iOS messenger

I need to build an app such as "Messages" in iPhone, but easier (don't need to send messages to server, only in datebase). I was faced with some questions.
http://www.ibm.com/developerworks/library/x-ioschat/index.html
In this tutorial messages look like TableView, how can I do them such as in iPhone standard messanger (comics speach). And how can I implement bar with camera button, text box and send button (what class is responsible for this)?
You are in luck good sir, there is already a class that can fix you up with this and avoid all the work, it's called AcaniChat (screenshot provided). Or you can even see at Sam Soffle's SSMessagesViewController, he is a well known iOS developer who built this class.
It will definitely help you, if you want to mimic that behavior.