Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Google.Analytics/Google.Analytics.uno
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using Fuse.Controls;
using Fuse.Controls.Native;
using Fuse.Controls.Native.Android;
using Uno.Threading;
using Uno.Platform2;
using Uno.Platform;

namespace Google.Analytics
{
Expand All @@ -19,7 +19,7 @@ namespace Google.Analytics
{
[Foreign(Language.ObjC)]
extern(iOS)
public void StartService(ApplicationState state)
public void StartService(Fuse.Platform.ApplicationState state)
@{
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
Expand Down Expand Up @@ -75,7 +75,7 @@ namespace Google.Analytics
extern(Android) Java.Object _defaultTracker;

extern(Android)
public void StartService(ApplicationState state)
public void StartService(Fuse.Platform.ApplicationState state)
{
_defaultTracker = createDefaultTracker();
}
Expand Down Expand Up @@ -185,7 +185,7 @@ namespace Google.Analytics
extern(!mobile)
internal class AnalyticsService
{
public void StartService(ApplicationState state) {
public void StartService(Fuse.Platform.ApplicationState state) {
debug_log("Google Analytics not supported in this platform.");
}
public void ScreenView(string page) {
Expand Down
1 change: 0 additions & 1 deletion Google.Analytics/Google.Analytics.unoproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"Packages": [
"Fuse",
"FuseJS",
"FuseCore",
"Fuse.Scripting"
],
"Includes": [
Expand Down
4 changes: 2 additions & 2 deletions Google.Analytics/JS.uno
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ namespace Google.Analytics.JS
{
if(_instance != null) return;

Resource.SetGlobalKey(_instance = this, "Google/Analytics");
Uno.UX.Resource.SetGlobalKey(_instance = this, "Google/Analytics");

AddMember(new NativeFunction("ScreenView", ScreenView));
AddMember(new NativeFunction("TrackEvent", TrackEvent));

_analyticsService = new AnalyticsService();

Uno.Platform2.Application.Started += _analyticsService.StartService;
Fuse.Platform.Lifecycle.Started += _analyticsService.StartService;

debug_log("Analytics Module Initialized");
}
Expand Down