{"action":"created","issue":{"url":"https://api.github.com/repos/polychrom/cordova-android-actionbar/issues/17","labels_url":"https://api.github.com/repos/polychrom/cordova-android-actionbar/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/polychrom/cordova-android-actionbar/issues/17/comments","events_url":"https://api.github.com/repos/polychrom/cordova-android-actionbar/issues/17/events","html_url":"https://github.com/polychrom/cordova-android-actionbar/issues/17","id":89139126,"number":17,"title":"Not working in Cordova 5.1.1 (cordova-android@4.0.2)","user":{"login":"jfrumar","id":1927629,"avatar_url":"https://avatars.githubusercontent.com/u/1927629?v=3","gravatar_id":"","url":"https://api.github.com/users/jfrumar","html_url":"https://github.com/jfrumar","followers_url":"https://api.github.com/users/jfrumar/followers","following_url":"https://api.github.com/users/jfrumar/following{/other_user}","gists_url":"https://api.github.com/users/jfrumar/gists{/gist_id}","starred_url":"https://api.github.com/users/jfrumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfrumar/subscriptions","organizations_url":"https://api.github.com/users/jfrumar/orgs","repos_url":"https://api.github.com/users/jfrumar/repos","events_url":"https://api.github.com/users/jfrumar/events{/privacy}","received_events_url":"https://api.github.com/users/jfrumar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-17T22:10:13Z","updated_at":"2015-06-17T22:40:43Z","closed_at":null,"body":"I just created a new project and added the plugin:\r\n\r\n`cordova create project actionBarTest && cd actionBarTest`\r\n`cordova platform add android`\r\n`cordova plugin add https://github.com/polychrom/cordova-android-actionbar.git`\r\n\r\nCordova-android has changed now that it has a pluggable webview. Needed to change line 48 to:\r\n\r\n```java\r\nfinal Activity ctx = cordova.getActivity();\r\n```\r\n\r\nand comment out line 692:\r\n\r\n```java\r\nremoveFilename(webView.getOriginalUrl())\r\n```\r\n\r\nI also added the requisite calls in the MainActivity.java:\r\n\r\n```java\r\n@Override\r\n    public void onCreate(Bundle savedInstanceState)\r\n    {\r\n      requestWindowFeature(Window.FEATURE_ACTION_BAR);\r\n        super.onCreate(savedInstanceState);\r\n        // Set by <content src=\"index.html\" /> in config.xml\r\n        loadUrl(launchUrl);\r\n      getActionBar();\r\n    }\r\n```\r\n\r\nHowever when I attempt to interact with the plugin, I am getting *null* when the code tries to get the actionbar:\r\n\r\n```java\r\nfinal ActionBar bar = ctx.getActionBar();\r\n```\r\n\r\nAny ideas please?"},"comment":{"url":"https://api.github.com/repos/polychrom/cordova-android-actionbar/issues/comments/112972629","html_url":"https://github.com/polychrom/cordova-android-actionbar/issues/17#issuecomment-112972629","issue_url":"https://api.github.com/repos/polychrom/cordova-android-actionbar/issues/17","id":112972629,"user":{"login":"jfrumar","id":1927629,"avatar_url":"https://avatars.githubusercontent.com/u/1927629?v=3","gravatar_id":"","url":"https://api.github.com/users/jfrumar","html_url":"https://github.com/jfrumar","followers_url":"https://api.github.com/users/jfrumar/followers","following_url":"https://api.github.com/users/jfrumar/following{/other_user}","gists_url":"https://api.github.com/users/jfrumar/gists{/gist_id}","starred_url":"https://api.github.com/users/jfrumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfrumar/subscriptions","organizations_url":"https://api.github.com/users/jfrumar/orgs","repos_url":"https://api.github.com/users/jfrumar/repos","events_url":"https://api.github.com/users/jfrumar/events{/privacy}","received_events_url":"https://api.github.com/users/jfrumar/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T22:40:43Z","updated_at":"2015-06-17T22:40:43Z","body":"Further investigation reveals that:\r\n\r\n```java\r\nLog.d(LOG_TAG, \"Window has action bar feature: \" + getWindow().hasFeature(Window.FEATURE_ACTION_BAR));\r\n```\r\n \r\nreports that it does, but after:\r\n\r\n```java\r\nsuper.onCreate(savedInstanceState);\r\nsuper.init();\r\n```\r\n\r\nit does not. Unfortunately if you call ```java getActionBar() ``` before the onCreate() and init() calls you get an exception."}}