Android Auto ScreenManager#popToRoot followed by a ScreenManager#push doesn't re-count the step - android-auto

For some reason I need to refresh the Car app. I tried to invoke ScreenManager#popToRoot first, then invoke ScreenManager#push. However the step doesn't re-count, instead it is increased by one.
Is there a way for me to refresh the Car App?

Related

Receive notification back from Xamarin Forms Maps

I have a Xamarin Forms app that, during it's execution, launches the Maps plugin (from the Essentials package). Here's the code that I use to launch the maps:
var location = new Location(latitude, longitude);
var options = new MapLaunchOptions
{
NavigationMode = NavigationMode.Driving
};
await Map.OpenAsync(location, options);
However, since I want the user to be directed to a location, I want to know when they get there; the idea being that some events occur within the app when the user arrives.
It looks, to me, like the Maps plug-in doesn't provide any kind of notification.
I've been through a few iterations of this. Initially, I thought of using the Geolocator to identify when the user arrives, then had a look at a Geofencing plug-in that I found.
Before I head down either of these rabbit holes: is it possible to get the Maps plug-in to tell me when the user arrives at a location.
It is possible by Creating the Custom Map to realize it in each platform.
You can create a Timer Task in Background service to execute getting current location from Geolocator (not a plugin).Then when current location is detination , message can be passed to where you want to do.
By the way , about native framework in each platform . There are some methods like UpdateLocation can be directly used to know the current location .
Such as :
IOS has startUpdatingLocation method to listen the current location.
Android has onLocationChanged method to know the current location if changed.
What need to do is to notification the user he has arrived the detination when the current position enters the range .

Navigate to a frame that havn't been used yet

I'm using Nativescript-Vue, and i encounter this problem. Actually we can use navigateTo and specify a frame that will hold our Page modules. My problem is that i can't navigate to an unused frame since navigateTo method is using tns-core-modules/ui/frame/getFrameById which only work for already navigated frames.
I will try to explain my issue :
Actually, i use only one frame for all my application.
I have a Login page/component which is the entry point of my application in case of user is not auth.
After the login process, the user can access to the real application. The issue appears when he will logout : the majority of my components in my application are using data related to his account, so, when he disconnect, all these components are breaking up because these component, which are in NavigationEntry, are still in my "DOM" ( ? i don't know how i can name the "DOM" of nativescript ).
So i wanted to use a Frame for the Login process, and a frame for my Application, so, when the user logout, i can use navigateTo(Login, { clearHistory: true } in order to remove all the NavigationEntry that contains my components which are using the account's data.
And, that's where I wanted to come : in the case of the user is already authentificated when launching the app, the frame dedied for login havn't be used, so when the user press "logout" i can't navigate to this unused frame.
Here a little diagram of what i wanted to achieve :
Maybe there is a simpler way to clean all the navigation entry, but i didn't find how.
Maybe i poorly structured my project, so tell me if i'm wrong somewhere.

Google Tag Manager isn't tracking mobile click to calls

I am trying to track clicks on the phone number on the website. After I set up the trigger using following settings:
Trigger Type: all elements;
Page URL: contains "tel:" ;
Click Text: contains "13";
With these settings, the trigger is firing correctly on the desktop but isn't working on mobile.
I tried to use only "Page URL"/"Text Only"/"Form Text"/"Form contains" as conditions for the trigger to fire, but all attempts are unsuccessful. I also tried to use "Just Links" as a trigger type but it's not helping.
I also tested the URL in different mobile browsers (chrome/safari) and emulator. With an emulator, the tag is firing correctly but it's not working on the
Please have a look at the preview to see the page and tracking I am talking about:
https://www.googletagmanager.com/start_preview/gtm?uiv2&id=GTM-T92J432&gtm_auth=MmNY2ZtOefQOp1Kce4yUFQ&gtm_preview=env-5&gtm_debug=x&url=https://lp.acfc.com.au/good-credit
I appreciate your advice on what is the problem and how it can be fixed.
Thanks!
Kirill
Actually, better way of doing this to set generic trigger in GTM, then you will be able to track any phones on your website:
1) Enable built-in variable Click Element (if you already have it, you can skip this step)
2) Create trigger, which will fire for all links which have tel:***** (it can be any phone).
CSS selector on the screenshot is a[href*="tel:"]
3) Create a tag, which will send data to GA
4) Check your events in GA.
Keep in mind that it might take a couple of hours to appear in Behaviour-> Events tab. Or you can check it immediately in Real Time -> Events tab
RESOLVED:
I just found out that in order to identify an event it is safer to look at how the data layer is changing after the action rather than on the "Variable" tab.
By doing so, you can see what data is actually going to google analytics, and it is more stable to use it as an ID for a trigger to fire.
In my case, I've had only elementURL that was pushed back to the datalayer. I used the parameter elementID equals "tel:xxxxxx" to make the tracker work. Hope it will help (just put your number instead of x).
Cheers!

Branch.io: detect first install from Unity

Trying to detect the first install event from branch.io link (succesfully implement link creating and sharing). I am using Unity branch sdk. The feature i try to create:
user_1 creates and share link to user_2.
When user_2 opens the link and install app i need to reward both of them (with inner in-game coins)
So i succesfully implement the 1. but I cant understand how to detect is user_2 installs the app or simply open it. All data that comes from branch.io UniversalObject callback doesn't contain information that i need.
Which the correct way to detect the install from code?
Alex from Branch here.
The callback parameter you need is +is_first_session. This is one of the parameters returned when the Branch session is initiated each time your app opens (you can find all all these parameters here). If this returns true, then that device has just installed the app (instead of opening it).
However, note that when these parameters are returned, it's impossible to immediately determine if the user is new (what you want), the device is new (not what you want, since the reward could be given twice if the user has installed on multiple devices), or neither (the user deleted the app and reinstalled on the same device). You would probably want to hold off on actually awarding the referral points until after the user has logged in with some sort of unique ID.
Branch also has a built-in feature for tracking referral points that might be useful. That lets you configure all the rules using the dashboard UI instead of needing to do it programmatically inside your app.

Clean UI elements watchOS 2 after lock

When the app starts is Apple watchOS2 it calls:
awakeWithContext
Then, if you lock and unlock the app, the lifecycle calls:
willActivate
The problem that I have is that I cannot remove the UI elements (clean screen), without user see the "old" screen during 1 second.
From the Apple documentation:
didDeactivate:
-Do not use this method to modify your interface......Modifications can be made only during initialization of your interface controller and between calls to willActivate and this method.
but then in willActivate method:
.... Do not use this method to perform the initial setup of your interface.
I don't know what I have to do to "clean" the screen when the user locks the app.
Thanks for your time.
The answer from Apple:
Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.

Resources