Cannot get Google Analytics Plugin to Work with PhoneGap 2.0 - plugins

I had been using PhoneGap 1.9 for a while and was successfully using the Google Analytics Plugin.
I recently upgraded to PG 2.0 (so that I could use the new Urban Airship plugin) and now my Google Analytics seems to have stopped functioning.
Unfortunately, I think it has something to do with the initialization of the plugin via JavaScript. After some frustration I got my app to finally compile. But, my app pretty much just stops responding after the Google Analytics plugin is initialized in my JavaScript.
I wish I could give you guys some error messages or something, but I am getting no compiler errors and I am getting no JavaScript errors. The app just does not respond when I use the following two lines:
g_objGoogleAnalytics = window.plugins.googleAnalyticsPlugin;
g_objGoogleAnalytics.startTrackerWithAccountID("UA-XXXXXXXX-X");
If I comment these two lines out, everything else in the app works like a charm.
Has anyone got the Google Analytics plugin working under PG 2.0? If so, any advice or steps would be greatly appreciated.
UPDATE: I added some error checking with try/catch and the console log now states "undefined is not an object" whenever I execute the above two lines of code.

I found the answer myself. kieranshaw on github changed the keyword "PhoneGap" to "codova" in the JS file and that seemed to mix the issue. You can see the changes here: https://github.com/kieranshaw/phonegap-plugins/commit/cc4424410869912ff278de0228a6c328b1296fbe

Here's a way to implement GA on PG without plug-ins, though there are limitations as indicated in the solution: How to use Google Analytics with Phonegap without a plugin?

Related

Error Build Swift code with GoogleCast

I don't know whats wrong with my GoogleCast API. When i imported GGCast into my project it was OK. Everythin good. but it had problem when i built it.
My error dialog
I think that's an integration issue. From my point of view, the best solution would be to use CocoaPods and to integrate google-cast-sdk with it.
If you're not familiar with CocoaPods, please take some time to look at this introduction.
It will not take you more than an hour to understand how CocoaPods works, and to integrate it. But it will save you lots of time in the future.

React Native with Unity

Does anyone have any experience combining React Native and Unity? I'm looking to start a Unity project that's very UI Heavy and I'm thinking about using React Native to take advantage of its UI capabilities on mobile and web.
I'm curious what the workflow for such an approach would be.
Finally after a lot of trials managed to do this. These are the steps.
1) Using this link, export android project for Gradle.
Select Gradle in the Build Settings window and check the Export Project checkbox.
Click Export and select the destination folder.
2) Import the generated folder in Android studio. Select ok whenever prompted. In this process, you will encounter following issues
2a) Gradle Sync Failed due to org.gradle.api.internal.tasks issues. Resolve using this link
3) Create React Native App using this link
4) Start Integrating Android exported folder inside created react native app using this link. Don't upgrade Gradle as Android studio will ask you again and again. You will encounter following issues. Don't go through "Test Integration" until you are finished with #5 here.
4a) While configuring maven, use this url for maven url "$rootDir/../node_modules/react-native/android" .
4b) While configuring maven, if you encounter problem related to javax.inject:javax.inject". Use this link.
4c) You may also encounter this error "Conflict with dependency 'com.google.code.findbugs:jsr305'". You can solve this link.
4d) During Code integration section of this link, focus on the following section: If you are using a starter kit for React Native, replace the "HelloWorld" string with the one in your index.android.js file (it’s the first argument to the AppRegistry.registerComponent() method). Here you have to replace with project name.
5) Before going through "Test your Integration" section, you have to add code to call MyReactActivity from UnityActivity. This link will help.
6) Go through "Test your Integration" section of link provided in #4. You may encounter following problems.
6a) unable to load script from assets index.android.bundle. Use this link.
6b) could not connect to development server on android. Use this link.
Check my article on Medium
I've shown with an example on How to integrate react native with Unity 3D step by step. My aim was to use the react native within the Unity3D like a module which is quite convenient if you're gonna heavily work on Unity 3D. Hope this helps for someone who comes here later.
I'm unsure as how a Unity game is built for iOS, if it uses Cocoa Touch for rendering its core classes.
If it does, and you have access or ability to render a UIViewController then you can render your React Native application. The only thing you would have to facilitate is setting up communication between the two applications.
Here is an example of rendering a native UI Component inside a React Native app that may help. http://moduscreate.com/leverage-existing-ios-views-react-native-app/
I was curious as well, and created an example project of how to do this for Android: https://github.com/marijnz/unity-react.
If this is a viable option, at least depends on:
How long the project will be running, both React and Unity have to be updated and this gets probably tougher over time.
The amount of sdk's/dependencies the project has.
If you want to do iOS as well.
In general, I'd probably avoid going this way.
Even though the example seems pretty simple now, it was a pain to get to that (as Shaunak's answer already hints at ;))

Email Notification unpredicted behaviour in sonarqube

This is about sonarqube 5.1 version
I have issue assign plugin and also subscribed to the emails in my profile page. I've done some erroneous SVN commits deliberately to check the email notification settings but it doesn't seem to work correctly. I receive emails sometimes but other times it doesn't work like that.
I know this is not a constructive enough question but I'm really stucked here after trying all the scenarios and going through the documentation.
Any insight would be highly appreciated.
You should uninstall this plugin. It is compatible, but it does not work correctly. The problem is that SonarQube 5.1 introduced core auto assignment (see automatic issue assignment and SONAR-5906). The core functionality & plugin execution order is as follows:
Plugin during the execution assigns issues & collects information to whom he should send e-mails. Next core functionality reassign issues.
Core functionality reassigns issues
Plugin sends emails with incorrect data
See topic on SonarQube mailing list
I am also using SQ 5.1 and Issue Assign plugin works perfectly fine without any issues. You should check your email notification settings.

Activity stream missing after JIRA upgrade

I upgraded our JIRA from version 6 to version 6.1. Suddenly the Activity Streams are always empty. It is very annoying for the users who were very dependent on them. So I need to get the activity streams back.
What I have tried so far:
1. Reindexing
2. Creating a new widget for activity stream
What log can I look into to see what is broken? Do I need to create a new filter or something?
Please do not create activitystream-gadget.xml. Instead, remove the gadgets you have now and install the latest versions of each--including the Activity Stream gadget itself.
Please look at your atlassian-jira.log file.
Mostly this is caused by outdated plugins using deprecated (and now removed) classes. Similar thing happened to me when OSUser class was removed due to deprecation and an older plugin still used it.
If you are not able to view the log, try disabling user installed plugins.

Which OAuth library do you find works best for Objective-C/iPhone?

I have been looking to switch to OAuth for my Twitter integration code and now that there is a deadline in less than 7 weeks (see countdown link) it is even more important to make the jump to OAuth. I have been doing Basic Authentication which is extremely easy. Unfortunately OAuth does not appear to be something that I would whip together in a couple of hours.
http://www.countdowntooauth.com/
So I am looking to use a library. I have put together the following list.
MPOAuth
MGTwitterEngine
OAuthConsumer
I see that MPOAuth has some great features with a good deal of testing code in place but there is one big problem. It does not work. The sample iPhone project that is supposed to authenticate with Twitter causes an error which others have identified and logged as a bug.
http://code.google.com/p/mpoauthconnection/issues/detail?id=29
The last code change was March 11 and this bug was filed on March 30. It has been over a month and this critical bug has not been fixed yet. So I have moved on to MGTwitterEngine.
I pulled down the source code and loaded it up in Xcode. Immediately I find that there are a few dependencies and the README file does not have a clear list of steps to fetch those dependencies and integrate them with the project so that it builds successfully. I see this as a sign that the project is not mature enough for prime time. I see also that the project references 2 libraries for JSON when one should be enough. One is TouchJSON which has worked well for me so I am again discouraged from relying on this project for my applications.
I did find that MGTwitterEngine makes use of OAuthConsumer which is one of many OAuth projects hosted by an OAuth project on Google Code.
http://code.google.com/p/oauth/
http://code.google.com/p/oauthconsumer/wiki/UsingOAuthConsumer
It looks like OAuthConsumer is a good choice at first glance. It is hosted with other OAuth libraries and has some nice documentation with it. I pulled down the code and it builds without errors but it does have many warnings. And when I run the new Build and Analyze feature in Xcode 3.2 I see 50 analyzer results. Many are marked as potential memory leaks which would likely lead to instability in any app which uses this library.
It seems there is no clear winner and I have to go with something before the big Twitter OAuth deadline.
Any suggestions?
I've used bengottlieb's Twitter-OAuth without issues.
Build+Analyse finds only one issue (in SA_OAuthTwitterController.m) and that's just a variable that has a value stored during initialization that is never read. I've not seen any leaks in my use of it. It was simple to implement and so far (two apps in the store using it, a third in development) no problems at all.
A new single-file solution is TDOAuth: http://github.com/tweetdeck/TDOAuth.
It's well-tested in that it is used in the TweetDeck iOS clients.
I recently had to implement "post to Twitter".
What I found was that none of the various projects would work out-of-the-box. They're all close, but not quite there.
Eventually I settled on OAuthConsumer, Stig Brautaset's SBJSon, with some ideas more than code borrowed from Ben Gottlieb's Twitter-OAuth-iPhone for pin processing.
I probably would have looked at MGTwitterEngine, but I didn't need to hit that much of the API - just status updates.
I seem to recall having to hack OAuthConsumer to set a few parameters correctly - that was the biggest stumbling block.
Try this Framework out for size: https://github.com/materik/meauth-ios, works well for BitBucket's API and am in progress of testing it with more sites. Please give feedback and contribute.