Handling deep-linking via a web link in Xamarin for Android - xamarin

I need to handle a deep-link in my Xamarin application which will come from a mail.
I managed to make it works on Android and IOS but I still have a trouble with Android.
As said in this blog i overrode the OnAppLinkRequestReceived method to handle the navigation.
The problem is that this method is triggered once per instance of the App.
For example, if i click on the link the first time it will go to the right page(page A) because the code I wrote is triggered, but if go to another page (Page B), then put the App on background, go to back my mails and click a second time on the link, it will just resume the App and open the page B, not the page A.
Do you have any ideas on how it can be triggered at each time i click on the link ?

I finally used the native android behaviour for deep-linking with Intents and it works in Xamarin

Related

Closing browser without user interaction in Xamarin Forms

I have a scenario where I need to open a browser to remove user cookies for logging out. So the process is:
Open browser (Chrome CustomTab or SFSafariView depending on OS) and point it towards my URL to delete cookies.
Send the user back to the mobile app login screen.
Where I'm having an issue is step 2. How do I go about closing/minimizing the browser without requiring user interaction? The only thing I have found so far is to run System.Diagnostics.Process.GetCurrentProcess().Kill(); which closes the entire app, but I have seen comments online that doing this might cause the app to get rejected by Google and/or Apple.
Any ideas on how I can solve this?
You can put SFSafariViewController inside the navigation controller and then you can dismiss the navigation controller. That's for iOS assuming that you already know when to call this code, just don't know how. For Android... no idea for now, probably you should ask it as a separate question not too many people are experts both for Android and iOS...

How can I create a method to detect when a notification is clicked using xamarin coss-platform portable?

I´m a bit new to Xamarin Forms development, but not to Android (Java) development. Here´s the scenario:
I´ve developed an app for android, which schedules notifications (NotificationManager) and adds an intent to each notification in order to redirect the user to a specific url inside a webview. The url came from the notification intent.
So, I´m doing exactly the same thing in xamarin, in order to build the iOS version. Since I´m also an ASP.NET, I chose this method.
I´ve done all the basic stuff, so far:
created the webview with the right address;
created the routine which sets the cross-platform notifications using CrossLocalNotifications (Xam.Plugins.Notifier)
This is the problem:
I need to create a method in which the app redirects (webview) the user, once he clicks the notifications, in the portable solution level. I think I can manage to develop the logic to use the webview I currently have. I just can´t seem to find anywhere on the web a tip for creating a method to "listen" to the user click and catch information (or just the ID) of the notification created, so I can build the routine.
Anyone can help or have a better solution?

How universal link works in IOS?

We created universal link for our app following apple documentation : https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html
And its working fine, when I tap on link, my app open successfully. But at status bar of my app I am getting two link.
1. At left top side, back to sms app, where I received link.
2. Other at right top side, my app appstore link.
If I tap on link 2, universal links no lpnger works.
Any Idea?
That is by (Apple's) design. To re-enable Universal Linking behavior, either long-press on the URL in an app like Notes or Message, or once you are on the fallback page just scroll all the way up until an Open banner appears.
Re-enable Universal Link will only work if you have added right Domains: applinks:www.example.com
in Associates Domains column.
If associate domains not starting with www. then please recheck the link you want to open must not have www. in front of it.

My windows phone application runs when ran though visual studio (onclick of device button) but when I disconnect and run it doesn't?

I have written file picker code in my project. When i run the project in my windows phone by clicking on device button in visual studio, the app runs fine(I mean it opens pictures library and i can select a photo and preview it).
But when I disconnect my usb and then open the app in the phone and when i open pictures library on click of a button , the pictures library opens briefly and then the app crashes immediately(My app closes).
Can anyone please help me with this??
As written in the blog post , the AndContinue method run in a different process and to do so, the current running app goes into the background or even gets closed sometimes, that is what you are experiencing in your app as far i can tell but not sure why different things happening during debug & deploy.
There must be a callback inside app.xaml.cs specifically to handle the condition when calling application(which was sent into background) comes in foreground, read this blog post carefully & you'll understand as what you need to change in your code :
using-the-andcontinue-methods-in-windows-phone
http://blogs.msdn.com/b/wsdevsol/archive/2014/05/08/using-the-andcontinue-methods-in-windows-phone-silverlight-8-1-apps.aspx
I just dealt with this issue and one of the reasons why there are differences between debug and deploy is because of the suspending event.
During debug, the application does not actually get suspended until you manually do it through Lifecycle Events. This means that when you pick a file on debug and the app is put to the background to load the file picker, it is not actually suspended, while when the app is deployed, it actually gets suspended.
Look into your app_resuming method and OnSuspending methods in your app.xaml that may be causing errors not occurring during debug.

how much time unpublished app remains into chrome web store?

I have published my app into chrome web store first time.I did some changes and was going to press publish link again but by mistake i clicked on unpublish link.
Now it is showing status as pending review. My question is i need create new app listing again ? or i can publish previous app after review and how much time will it take ?

Resources