{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik-sdk-android/issues/34","labels_url":"https://api.github.com/repos/piwik/piwik-sdk-android/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik-sdk-android/issues/34/comments","events_url":"https://api.github.com/repos/piwik/piwik-sdk-android/issues/34/events","html_url":"https://github.com/piwik/piwik-sdk-android/pull/34","id":64393788,"number":34,"title":"Refactoring for #23 and more","user":{"login":"d4rken","id":1439229,"avatar_url":"https://avatars.githubusercontent.com/u/1439229?v=3","gravatar_id":"","url":"https://api.github.com/users/d4rken","html_url":"https://github.com/d4rken","followers_url":"https://api.github.com/users/d4rken/followers","following_url":"https://api.github.com/users/d4rken/following{/other_user}","gists_url":"https://api.github.com/users/d4rken/gists{/gist_id}","starred_url":"https://api.github.com/users/d4rken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4rken/subscriptions","organizations_url":"https://api.github.com/users/d4rken/orgs","repos_url":"https://api.github.com/users/d4rken/repos","events_url":"https://api.github.com/users/d4rken/events{/privacy}","received_events_url":"https://api.github.com/users/d4rken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-25T23:13:20Z","updated_at":"2015-03-26T10:51:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/piwik/piwik-sdk-android/pulls/34","html_url":"https://github.com/piwik/piwik-sdk-android/pull/34","diff_url":"https://github.com/piwik/piwik-sdk-android/pull/34.diff","patch_url":"https://github.com/piwik/piwik-sdk-android/pull/34.patch"},"body":"* Simplified getInstance synchronization\r\n* Removed the HashMap<Application,Tracker>, see #23\r\n* ~~Each Tracker now has their own preferences based on apiurl+siteid. So in the future we can track one-shot events per different trackers. This might see some further changes when i submit a PR with changes for download tracking. Note: If you would update the library and call trackDownload again, it would send a new event as the old preference file was per piwik instance not per tracker.~~\r\n* api-url and site-id are now final and can only be set when creating the tracker. It was previously already not possible to create a tracker with no api-url, why would you then want to create a tracker with one url and then change it later. This also prevents concurrency issues, what if the api-url/siteid get changed while some other routines are accessing them. TL;DR Enforcing the practice of creating a new Tracker for a new api-url/siteid.\r\n* Updated all tests to fit the changes and fixed sharedpreferences not working correctly for testcases.\r\n\r\nSome autoformatting and import optimization was done too and each time i change a specific variable i rename it to **m**Variable. m is for member, while in the end it's personal preference, it's in line with naming in official AOSP classes, i hope no one is annoyed by that.\r\n\r\nTests all pass on my machine and this is the first PR against the new dev branch :+1:\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/piwik/piwik-sdk-android/issues/comments/86450285","html_url":"https://github.com/piwik/piwik-sdk-android/pull/34#issuecomment-86450285","issue_url":"https://api.github.com/repos/piwik/piwik-sdk-android/issues/34","id":86450285,"user":{"login":"d4rken","id":1439229,"avatar_url":"https://avatars.githubusercontent.com/u/1439229?v=3","gravatar_id":"","url":"https://api.github.com/users/d4rken","html_url":"https://github.com/d4rken","followers_url":"https://api.github.com/users/d4rken/followers","following_url":"https://api.github.com/users/d4rken/following{/other_user}","gists_url":"https://api.github.com/users/d4rken/gists{/gist_id}","starred_url":"https://api.github.com/users/d4rken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d4rken/subscriptions","organizations_url":"https://api.github.com/users/d4rken/orgs","repos_url":"https://api.github.com/users/d4rken/repos","events_url":"https://api.github.com/users/d4rken/events{/privacy}","received_events_url":"https://api.github.com/users/d4rken/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T10:51:31Z","updated_at":"2015-03-26T10:51:31Z","body":"Yeah just saw that, currently fixing the conflicts."}}