This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
3,754 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
*.userprefs | ||
/bin | ||
*.DS_Store | ||
[Bb]in | ||
[Dd]ebug*/ | ||
obj/ | ||
tmp/ | ||
|
||
GoogleAnalytics/binding/Google Analytics SDK/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
using System; | ||
using MonoTouch.ObjCRuntime; | ||
|
||
[assembly: LinkWith ("libFlurryAnalytics.a", LinkTarget.Simulator | LinkTarget.ArmV6 | LinkTarget.ArmV7, ForceLoad = true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
using System; | ||
using MonoTouch.Foundation; | ||
namespace FlurryAnalytics | ||
{ | ||
[BaseType (typeof (NSObject))] | ||
interface FlurryAnalytics { | ||
[Static] | ||
[Export ("setAppVersion:")] | ||
void SetAppVersion (string version); | ||
|
||
[Static] | ||
[Export ("getFlurryAgentVersion")] | ||
string GetFlurryAgentVersion (); | ||
|
||
[Static] | ||
[Export ("setShowErrorInLogEnabled:")] | ||
void SetShowErrorInLog (bool value); | ||
|
||
[Static] | ||
[Export ("setDebugLogEnabled:")] | ||
void SetDebugLog (bool value); | ||
|
||
[Static] | ||
[Export ("setSessionContinueSeconds:")] | ||
void SetSessionContinue (int seconds); | ||
|
||
[Static] | ||
[Export ("setSecureTransportEnabled:")] | ||
void SetSecureTransportEnabled (bool value); | ||
|
||
[Static] | ||
[Export ("startSession:")] | ||
void StartSession (string apiKey); | ||
|
||
[Static] | ||
[Export ("logEvent:")] | ||
void LogEvent (string eventName); | ||
|
||
[Static] | ||
[Export ("logEvent:withParameters:")] | ||
void LogEvent (string eventName, NSDictionary parameters); | ||
|
||
[Static] | ||
[Export ("logError:message:exception:")] | ||
void LogError (string errorID, string message, NSException exception); | ||
|
||
[Static] | ||
[Export ("logError:message:error:")] | ||
void LogError (string errorID, string message, NSError error); | ||
|
||
[Static] | ||
[Export ("logEvent:timed:")] | ||
void LogEvent (string eventName, bool timed); | ||
|
||
[Static] | ||
[Export ("logEvent:withParameters:timed:")] | ||
void LogEvent (string eventName, NSDictionary parameters, bool timed); | ||
|
||
[Static] | ||
[Export ("endTimedEvent:withParameters:")] | ||
void EndTimedEvent (string eventName, NSDictionary parameters); | ||
|
||
// automatically track page view on UINavigationController or UITabBarController | ||
[Static] | ||
[Export ("logAllPageViews:")] | ||
void LogAllPageViews (NSObject target); | ||
|
||
[Static] | ||
[Export ("logPageView")] | ||
void LogPageView (); | ||
|
||
[Static] | ||
[Export ("setUserID:")] | ||
void SetUserID (string userID); | ||
|
||
[Static] | ||
[Export ("setAge:")] | ||
void SetAge (int age); | ||
|
||
[Static] | ||
[Export ("setGender:")] | ||
void SetGender (string gender); | ||
|
||
//[Static] | ||
//[Export ("setLatitude:longitude:horizontalAccuracy:verticalAccuracy:")] | ||
//void SetLocation (double latitude, double longitude, float horizontalAccuracy, float verticalAccuracy); | ||
|
||
[Static] | ||
[Export ("setSessionReportsOnCloseEnabled:")] | ||
void SetSessionReportsOnClose (bool sendSessionReportsOnClose); | ||
|
||
[Static] | ||
[Export ("setSessionReportsOnPauseEnabled:")] | ||
void SetSessionReportsOnPause (bool setSessionReportsOnPauseEnabled); | ||
|
||
[Static] | ||
[Export ("setEventLoggingEnabled:")] | ||
void SetEventLogging (bool value); | ||
|
||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
BTOUCH=/Developer/MonoTouch/usr/bin/btouch | ||
|
||
all: FlurryAnalytics.dll | ||
|
||
FlurryAnalytics.dll: Makefile AssemblyInfo.cs FlurryAnalytics.cs libFlurryAnalytics.a | ||
$(BTOUCH) FlurryAnalytics.cs AssemblyInfo.cs --out=$@ --link-with=libFlurryAnalytics.a,libFlurryAnalytics.a -x=extras.cs | ||
|
||
clean: | ||
-rm -f *.a *.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
using System; | ||
|
||
using System.Drawing; | ||
|
||
using System.Runtime.InteropServices; | ||
|
||
using MonoTouch; | ||
|
||
using MonoTouch.CoreFoundation; | ||
|
||
using MonoTouch.CoreMedia; | ||
|
||
using MonoTouch.CoreMotion; | ||
|
||
using MonoTouch.Foundation; | ||
|
||
using MonoTouch.ObjCRuntime; | ||
|
||
using MonoTouch.CoreAnimation; | ||
|
||
using MonoTouch.CoreLocation; | ||
|
||
using MonoTouch.MapKit; | ||
|
||
using MonoTouch.UIKit; | ||
|
||
using MonoTouch.CoreGraphics; | ||
|
||
using MonoTouch.NewsstandKit; | ||
|
||
using MonoTouch.GLKit; | ||
|
||
using OpenTK; | ||
namespace FlurryAnalytics | ||
{ | ||
public partial class FlurryAnalytics : NSObject { | ||
|
||
static IntPtr selSetLatitudeLongitudeHorizontalAccuracyVerticalAccuracy = Selector.GetHandle ("setLatitude:longitude:horizontalAccuracy:verticalAccuracy:"); | ||
|
||
[Export ("setLatitude:longitude:horizontalAccuracy:verticalAccuracy:")] | ||
public static void SetLocation (System.Double latitude, System.Double longitude, float horizontalAccuracy, float verticalAccuracy) | ||
{ | ||
Messaging.void_objc_msgSend_Double_Double_float_float (class_ptr, selSetLatitudeLongitudeHorizontalAccuracyVerticalAccuracy, latitude, longitude, horizontalAccuracy, verticalAccuracy); | ||
} | ||
} | ||
public partial class Messaging { | ||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSend")] | ||
public extern static void void_objc_msgSend_Double_Double_float_float (IntPtr receiver, IntPtr selector, Double arg1, Double arg2, float arg3, float arg4); | ||
[DllImport (LIBOBJC_DYLIB, EntryPoint="objc_msgSendSuper")] | ||
public extern static void void_objc_msgSendSuper_Double_Double_float_float (IntPtr receiver, IntPtr selector, Double arg1, Double arg2, float arg3, float arg4); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
doc/README.md |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions
26
FlurryAnalytics/sample/src/Xamarin.FlurryAnalyticsSample/Xamarin.FlurryAnalyticsSample.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.FlurryAnalyticsSample", "Xamarin.FlurryAnalyticsSample\Xamarin.FlurryAnalyticsSample.csproj", "{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|iPhoneSimulator = Debug|iPhoneSimulator | ||
Release|iPhoneSimulator = Release|iPhoneSimulator | ||
Debug|iPhone = Debug|iPhone | ||
Release|iPhone = Release|iPhone | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Debug|iPhone.ActiveCfg = Debug|iPhone | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Debug|iPhone.Build.0 = Debug|iPhone | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Release|iPhone.ActiveCfg = Release|iPhone | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Release|iPhone.Build.0 = Release|iPhone | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator | ||
{C41C8DB5-D450-4D22-8FC2-698CCF09C0DC}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator | ||
EndGlobalSection | ||
GlobalSection(MonoDevelopProperties) = preSolution | ||
StartupItem = Xamarin.FlurryAnalyticsSample\Xamarin.FlurryAnalyticsSample.csproj | ||
EndGlobalSection | ||
EndGlobal |
77 changes: 77 additions & 0 deletions
77
...ics/sample/src/Xamarin.FlurryAnalyticsSample/Xamarin.FlurryAnalyticsSample/AppDelegate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// | ||
// Copyright 2012 abhatia | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using MonoTouch.Foundation; | ||
using MonoTouch.UIKit; | ||
using FA=FlurryAnalytics; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Xamarin.FlurryAnalyticsSample | ||
{ | ||
[Register ("AppDelegate")] | ||
public partial class AppDelegate : UIApplicationDelegate | ||
{ | ||
UIWindow _Window; | ||
// Action<IntPtr> UncaughtExceptionHandlerAction; | ||
RootViewController _RootViewController; | ||
|
||
public override bool FinishedLaunching(UIApplication app, NSDictionary options) | ||
{ | ||
// UncaughtExceptionHandlerAction = UncaughtExceptionHandler; | ||
// NSSetUncaughtExceptionHandler (Marshal.GetFunctionPointerForDelegate (UncaughtExceptionHandlerAction)); | ||
|
||
// FA.FlurryAnalytics.StartSession("YOUR_API_KEY"); | ||
FA.FlurryAnalytics.StartSession("EHBIHF8XMGFVVP5YQZ9E"); | ||
// FA.FlurryAnalytics.SetSessionReportsOnPause(true); | ||
|
||
_Window = new UIWindow(UIScreen.MainScreen.Bounds); | ||
|
||
_RootViewController = new RootViewController(); | ||
_Window.RootViewController = _RootViewController; | ||
|
||
_Window.MakeKeyAndVisible(); | ||
return true; | ||
} | ||
|
||
public override void WillTerminate(UIApplication application) | ||
{ | ||
|
||
This comment has been minimized.
Sorry, something went wrong. |
||
} | ||
|
||
public override void WillEnterForeground(UIApplication application) | ||
{ | ||
// FA.FlurryAnalytics.LogEvent(string.Format("Application Sent to Background...")); | ||
} | ||
|
||
|
||
static void UncaughtExceptionHandler(IntPtr handle) | ||
{ | ||
|
||
var exception = new NSException(handle); | ||
FA.FlurryAnalytics.LogError("3584", exception.Reason, exception); | ||
|
||
Console.WriteLine(@"Got an exception...{0} -- {1}", exception.Name, exception.Reason); | ||
} | ||
|
||
// public delegate void NSUncaughtExceptionHandler (IntPtr exception); | ||
// | ||
// [DllImport ("/System/Library/Frameworks/Foundation.framework/Foundation")] | ||
// extern static void NSSetUncaughtExceptionHandler (IntPtr handler); | ||
} | ||
|
||
} | ||
|
18 changes: 18 additions & 0 deletions
18
...alytics/sample/src/Xamarin.FlurryAnalyticsSample/Xamarin.FlurryAnalyticsSample/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDisplayName</key> | ||
<string>FlurryAnalyticsSample</string> | ||
<key>UIDeviceFamily</key> | ||
<array> | ||
<integer>2</integer> | ||
</array> | ||
<key>UISupportedInterfaceOrientations</key> | ||
<array> | ||
<string>UIInterfaceOrientationPortrait</string> | ||
<string>UIInterfaceOrientationLandscapeLeft</string> | ||
<string>UIInterfaceOrientationLandscapeRight</string> | ||
</array> | ||
</dict> | ||
</plist> |
Oops, something went wrong.
just wondering, where is FA.Flurry.EndSession(); here?
Or framework with this bindings perform it automatically?