{"action":"created","issue":{"url":"https://api.github.com/repos/gorbin/ASNE/issues/68","labels_url":"https://api.github.com/repos/gorbin/ASNE/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/gorbin/ASNE/issues/68/comments","events_url":"https://api.github.com/repos/gorbin/ASNE/issues/68/events","html_url":"https://github.com/gorbin/ASNE/issues/68","id":54575179,"number":68,"title":"Using ASNE library from activity, not from fragment","user":{"login":"Aracem","id":2283594,"avatar_url":"https://avatars.githubusercontent.com/u/2283594?v=3","gravatar_id":"","url":"https://api.github.com/users/Aracem","html_url":"https://github.com/Aracem","followers_url":"https://api.github.com/users/Aracem/followers","following_url":"https://api.github.com/users/Aracem/following{/other_user}","gists_url":"https://api.github.com/users/Aracem/gists{/gist_id}","starred_url":"https://api.github.com/users/Aracem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aracem/subscriptions","organizations_url":"https://api.github.com/users/Aracem/orgs","repos_url":"https://api.github.com/users/Aracem/repos","events_url":"https://api.github.com/users/Aracem/events{/privacy}","received_events_url":"https://api.github.com/users/Aracem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-01-16T13:28:20Z","updated_at":"2015-03-23T09:44:12Z","closed_at":null,"body":"I integratin ASNE library in a base activity that let use login in all the screens of the application.\r\n\r\nThe problem is that SocialNetwork inicialization needs a Fragment to be instanciate.\r\n\r\nI can instanciate a SocialNetwork with the SocialNetworkManager fragment but if I make this:\r\n\r\npublic final void configureSocialLibrary() {\r\n        mSocialNetworkManager = new SocialNetworkManager();\r\n        mSocialNetworkManager.addSocialNetwork(getTwitterSocialNetwork());\r\n        mSocialNetworkManager.addSocialNetwork(getFacebookSocialNetwork());\r\n        mSocialNetworkManager.addSocialNetwork(getGoogleSocialNetwork());\r\n        getSupportFragmentManager().beginTransaction().add(mSocialNetworkManager, SOCIAL_TAG).commit();\r\n        mSocialNetworkManager.setOnInitializationCompleteListener(this);\r\n    }\r\n\r\nIt crash in the SocialNetwork class trying to get the SharedPreferences.\r\n\r\nIn the tutorial the solution is pass the Fragment that controls the buttons and that stuff instead of pass the SocialNetworkManager but this is not possible because I dont need Fragments to make the login -- remember I want to make login in every part of the app.\r\n\r\nI try, of course, of add the social networks before commit the social manager but doesn't works for evident reasons.\r\n\r\nAre there some solution for this or I need to make a fork with a builder with Fragment and Activity to fix the problem?\r\n"},"comment":{"url":"https://api.github.com/repos/gorbin/ASNE/issues/comments/84915045","html_url":"https://github.com/gorbin/ASNE/issues/68#issuecomment-84915045","issue_url":"https://api.github.com/repos/gorbin/ASNE/issues/68","id":84915045,"user":{"login":"frostymarvelous","id":923493,"avatar_url":"https://avatars.githubusercontent.com/u/923493?v=3","gravatar_id":"","url":"https://api.github.com/users/frostymarvelous","html_url":"https://github.com/frostymarvelous","followers_url":"https://api.github.com/users/frostymarvelous/followers","following_url":"https://api.github.com/users/frostymarvelous/following{/other_user}","gists_url":"https://api.github.com/users/frostymarvelous/gists{/gist_id}","starred_url":"https://api.github.com/users/frostymarvelous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostymarvelous/subscriptions","organizations_url":"https://api.github.com/users/frostymarvelous/orgs","repos_url":"https://api.github.com/users/frostymarvelous/repos","events_url":"https://api.github.com/users/frostymarvelous/events{/privacy}","received_events_url":"https://api.github.com/users/frostymarvelous/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T09:44:12Z","updated_at":"2015-03-23T09:44:12Z","body":"@pierrexn fixed with this https://github.com/frostymarvelous/ASNE/commit/9c32049751ecfcddc681f2a9a64c7df411f693e7 "}}