0

I followed this link (https://github.com/jfpsf/flurry-phonegap-plugin) to integrate flurry plugin in phonegap iPhone app.

After integration as given in the link. I called flurry methods:

flurry.startSession('XYZ',function(){
                                                             alert('success session');
                                                             },function(){
                                                             alert('fail session');
                                                             });

                         flurry.logEvent('app logevent',function(){
                                         alert('success logEvent');
                                         },function(){
                                         alert('fail logEvent');
                                         });

that are not giving any response. When app send to the background by clicking on home button and again open the app that flurry event occurred and works perfectly. Can anyone please help me for this. Why flurry plugin methods are working when app come from background?

Thanks in advance.

Patrick
  • 7,903
  • 11
  • 52
  • 87

1 Answers1

0
Please ensure that you press the home button before closing the app. This is required in order to complete the Flurry reporting lifecycle.

Please read the correct answer in this stackoverflow post: Adding Flurry in the alertView

Community
  • 1
  • 1
lakshmen
  • 28,346
  • 66
  • 178
  • 276
  • Actually I have integrated flurry in native iphone app, that is working fine,means no need to send app on background for calling the flurry methods. but when I am integrating in phonegap using flurryplugin this is giving problem(means send app to background for calling flurryplugin methods). – Dinesh Gulati May 29 '13 at 06:25
  • home button needs to be clicked to complete the reporting cycle.. thats my point... – lakshmen May 29 '13 at 06:26
  • I resolved this problem at my end, Just call flurry code after all third party APIs code and all web services calls. In other words Just call flurry methods last in the method. – Dinesh Gulati May 30 '13 at 13:29
  • I think, cordova uses javascript, and when the app is running, javascript is still loaded, but when you close the app javascript is unloaded and thus flurry reporting cycle does not get completed. On the other hand when you click home button app goes to pause mode where javascript is still loaded again. – Kishor Pawar Sep 17 '15 at 10:05