{"action":"created","issue":{"url":"https://api.github.com/repos/Appboy/appboy-android-sdk/issues/95","repository_url":"https://api.github.com/repos/Appboy/appboy-android-sdk","labels_url":"https://api.github.com/repos/Appboy/appboy-android-sdk/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/Appboy/appboy-android-sdk/issues/95/comments","events_url":"https://api.github.com/repos/Appboy/appboy-android-sdk/issues/95/events","html_url":"https://github.com/Appboy/appboy-android-sdk/issues/95","id":314272137,"number":95,"title":"Remove unnecessary code from AppboyUnityPlayerNativeActivity [Important]","user":{"login":"MartinGonzalez","id":4130008,"avatar_url":"https://avatars3.githubusercontent.com/u/4130008?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinGonzalez","html_url":"https://github.com/MartinGonzalez","followers_url":"https://api.github.com/users/MartinGonzalez/followers","following_url":"https://api.github.com/users/MartinGonzalez/following{/other_user}","gists_url":"https://api.github.com/users/MartinGonzalez/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinGonzalez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinGonzalez/subscriptions","organizations_url":"https://api.github.com/users/MartinGonzalez/orgs","repos_url":"https://api.github.com/users/MartinGonzalez/repos","events_url":"https://api.github.com/users/MartinGonzalez/events{/privacy}","received_events_url":"https://api.github.com/users/MartinGonzalez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-04-13T22:54:26Z","updated_at":"2018-05-07T19:19:45Z","closed_at":"2018-05-07T19:19:45Z","author_association":"NONE","body":"* [x] I have checked [Braze's documentation](https://www.braze.com/documentation/Android/) and am still experiencing the issue.\r\n\r\n# Report\r\n\r\n## What version of the Braze Android SDK are you using?\r\n2.1.4\r\n\r\n## What I want?\r\n\r\nFirst of all thanks for taking your time to read this issue. My request is to do some changes in `AppboyUnityPlayerNativeActivity` to allow **flexibility** with other implementations and professionalism in the service provided..\r\n\r\n- Extend from `UnityPlayerActivity` and **not** from `UnityPlayerNativeActivity`, this one and `UnityPlayerProxyActivity` are deprecated since Unity 3.4.\r\n\r\n- Remove code that forces you to use appboy activity as the main activity\r\n\r\nIn `AppboyUnityPlayerNativeActivity.java`\r\n\r\n\r\n```java\r\n  public void logInAppMessageClick(String messageJSONString) {\r\n    mAppboyUnityPlayerNativeActivityWrapper.logInAppMessageClick(messageJSONString, this);\r\n  }\r\n\r\n  public void logInAppMessageButtonClick(String messageJSONString, int buttonId) {\r\n    mAppboyUnityPlayerNativeActivityWrapper.logInAppMessageButtonClick(messageJSONString, buttonId, this);\r\n  }\r\n\r\n  public void logInAppMessageImpression(String messageJSONString) {\r\n    mAppboyUnityPlayerNativeActivityWrapper.logInAppMessageImpression(messageJSONString, this);\r\n  }\r\n```\r\n\r\nIn `AppBoyBinding.cs` Instead of calling directly to the Activity please call to `mAppboyUnityPlayerNativeActivityWrapper`.\r\n\r\n```c#\r\n public static void LogInAppMessageClicked(string inAppMessageJSONString) {\r\n      AppboyUnityActivity.Call(\"logInAppMessageClick\", new object[] { inAppMessageJSONString });\r\n    }\r\n\r\n    public static void LogInAppMessageImpression(string inAppMessageJSONString) {\r\n      AppboyUnityActivity.Call(\"logInAppMessageImpression\", new object[] { inAppMessageJSONString });\r\n    }\r\n    \r\n    public static void LogInAppMessageButtonClicked(string inAppMessageJSONString, int buttonID) {\r\n      AppboyUnityActivity.Call(\"logInAppMessageButtonClick\", new object[] { inAppMessageJSONString, buttonID });\r\n    }\r\n\r\n    [System.Obsolete(\"LogSlideupClicked is deprecated, please use LogInAppMessageClicked instead.\")]\r\n    public static void LogSlideupClicked(string slideupJSONString) {\r\n      AppboyUnityActivity.Call(\"logInAppMessageClick\", new object[] { slideupJSONString });\r\n    }\r\n\r\n    [System.Obsolete(\"LogSlideupImpression is deprecated, please use LogInAppMessageImpression instead.\")]\r\n    public static void LogSlideupImpression(string slideupJSONString) {\r\n      AppboyUnityActivity.Call(\"logInAppMessageImpression\", new object[] { slideupJSONString });\r\n    }\r\n```\r\n\r\n## Result\r\n\r\nDoing this will allow users to implement ActivityListeners **(Objects that will listen Activity lifecycle)** without being force to change your code or use your own main activity.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Appboy/appboy-android-sdk/issues/comments/387173754","html_url":"https://github.com/Appboy/appboy-android-sdk/issues/95#issuecomment-387173754","issue_url":"https://api.github.com/repos/Appboy/appboy-android-sdk/issues/95","id":387173754,"user":{"login":"Bucimis","id":1174698,"avatar_url":"https://avatars1.githubusercontent.com/u/1174698?v=4","gravatar_id":"","url":"https://api.github.com/users/Bucimis","html_url":"https://github.com/Bucimis","followers_url":"https://api.github.com/users/Bucimis/followers","following_url":"https://api.github.com/users/Bucimis/following{/other_user}","gists_url":"https://api.github.com/users/Bucimis/gists{/gist_id}","starred_url":"https://api.github.com/users/Bucimis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bucimis/subscriptions","organizations_url":"https://api.github.com/users/Bucimis/orgs","repos_url":"https://api.github.com/users/Bucimis/repos","events_url":"https://api.github.com/users/Bucimis/events{/privacy}","received_events_url":"https://api.github.com/users/Bucimis/received_events","type":"User","site_admin":false},"created_at":"2018-05-07T19:19:45Z","updated_at":"2018-05-07T19:19:45Z","author_association":"COLLABORATOR","body":"this is done, thanks again @MartinGonzalez "}}
{"actor":{"display_login":"Bucimis"}}