Skip to content

Commit

Permalink
Remove Application namespace in AndroidCallBack class
Browse files Browse the repository at this point in the history
  • Loading branch information
Husseinhj committed Jun 16, 2019
1 parent 11818a3 commit 52843fc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
40 changes: 18 additions & 22 deletions Assets/Scripts/ChabokPush/AndroidPluginCallback.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
using System;
using UnityEngine;
using UnityEngine;

namespace Application
public class AndroidPluginCallback : AndroidJavaProxy
{
public class AndroidPluginCallback : AndroidJavaProxy
{
public delegate void OnSuccessEvent(AndroidJavaObject count);
public delegate void onErrorEvent(AndroidJavaObject exception);
public delegate void OnSuccessEvent(AndroidJavaObject count);
public delegate void onErrorEvent(AndroidJavaObject exception);

public event OnSuccessEvent OnSuccess;
public event onErrorEvent OnError;
public event OnSuccessEvent OnSuccess;
public event onErrorEvent OnError;

public AndroidPluginCallback() : base("com.adpdigital.push.Callback") { }
public AndroidPluginCallback() : base("com.adpdigital.push.Callback") { }

private void onSuccess(AndroidJavaObject count)
private void onSuccess(AndroidJavaObject count)
{
if (OnSuccess != null)
{
if (OnSuccess != null)
{
OnSuccess.Invoke(count);
}
Debug.Log("ENTER callback onSuccess: " + count);
OnSuccess.Invoke(count);
}
Debug.Log("ENTER callback onSuccess: " + count);
}

public void onError(AndroidJavaObject exception)
public void onError(AndroidJavaObject exception)
{
if (OnError != null)
{
if (OnError != null)
{
OnError.Invoke(exception);
}
Debug.Log("ENTER callback onError: " + exception);
OnError.Invoke(exception);
}
Debug.Log("ENTER callback onError: " + exception);
}
}
1 change: 0 additions & 1 deletion Assets/Scripts/ChabokPush/ChabokPush.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Application;
using UnityEngine;

public class ChabokPush : MonoBehaviour
Expand Down
3 changes: 1 addition & 2 deletions Assets/Scripts/Main.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using Application;
using UnityEngine;

public class Main : MonoBehaviour
Expand Down

0 comments on commit 52843fc

Please sign in to comment.