Hi Richard,
Thanks for replying,
What i am trying to achieve :- Want to create an application which
will open Fennec & then open a webiste on it & when a website is fully
opened/loded & then collect telemetry each time from phone itself (
this will be done by my app) , after that delete collected telemetry
file, as next time when i will run my application again it will
create a new telemetry file & collect & delete it from phone itself.
Yes i am running Fennec from an intent also..
'So here are all details:-
I am launching Fennec via an android intent, here is what i am
doing in my APP
***************************************************************************************
intent.setComponent(new ComponentName("org.mozilla.fennec_ravi",
"org.mozilla.fennec_ravi.App"));
String finishJob="killApp";
int i=1;
intent.putExtra(finishJob,i );
this.startActivity(intent);
*******************************************************************************************
On Fennec code i have done following changes
*******************************************************************************************'
In function onTabChanged in BrowserApp.java following code is added
after this line of code
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java#268
260 case LINK_FAVICON:
261 // If tab is not loading and the favicon is updated, we
262 // want to load the image straight away. If tab is still
263 // loading, we only load the favicon once the page's content
264 // is fully loaded.
265 if (tab.getState() != Tab.STATE_LOADING) {
266 loadFavicon(tab);
267 }
268 break;
///////// NEW NEW CODE ADDED////////////
////////// CASE THUMBNAIL is new added by me as it will last event
which we will get & confirm that page is loaded & completed,
///////////thumbnail will be last to be displayed.
case THUMBNAIL:
if (killApp ==1) // killApp is thing which we
have got from last intent
{
// call finish now it migh kill telemetry
finish();
}
break;
***************************************************************************************************8
Just wrote above piece of code, after calling finish() it should
collect telemetry file generated, but it is not generating any
telmetry files after that in saved-telemetry-pings folder :-( , thats
BIG trouble for me .. not generating any file under
saved-telemetry-pings folder .]
1) Is this expected behavior (i.e. telemetry will not be collected
on phone after calling finish here ) OR there is some BUG.
2) Is there any way of solving this issue.
********************************************************************************************
Yes it is Telemetry loaded build, when i manually open fennec & open
back button after opening website it will create telemetry file.
P.S. >>>>
Telemetry file is created in default profile folder
saved-telemetry-pings folder.
Thanks,
Ravi
On Sat, Jun 28, 2014 at 6:26 PM, Richard Newman <[email protected]> wrote:
> Ravi,
>
> Are you launching Fennec via an intent, or in a GeckoView app, or something
> else?
>
> Via an intent, you have no control over what happens. Gecko will flush
> telemetry when it chooses to.
>
> Via GeckoView, you have control, to a point; call the methods that kats
> pointed you to.
>
> The other alternative is that there's some kind of bug here, and we should
> be flushing telemetry slugs on finish. We're receiving telemetry uploads, so
> telemetry seems to be working as designed. The onus is on you to find that
> bug if there is one.
>
> Sanity check: are you using a telemetry-enabled Fennec build?
>
> A broader question, though: what are you trying to achieve that requires you
> to flush telemetry? Starting there might be more productive.
>
> -R
>
>
> -----Original Message-----
> From: Ravi Inder Singh [[email protected]]
> Received: Friday, 27 Jun 2014, 8:00PM
> To: Kartikaya Gupta [[email protected]]
> CC: [email protected]
> Subject: Re: Telemetry code query ...
>
>
> Hi all,
> i am creating small app in which it will open a firefox fennec open a
> website & when
> webiste is opened then i KILL (Fennec) by calling finish, but i
> couldn't see telemetry file created in this case.
> Is there any wayout for this problem statement, so that file is
> created as soon as i call finish() i.e. after website is opened ?
>
>
>
> Thanks,
> Ravi
>
> On Sun, Jun 22, 2014 at 5:44 PM, Ravi Inder Singh <[email protected]>
> wrote:
>> Hi kats & all,
>>
>> This makes my problem statement more difficult, i am creating a
>> small app in which it will open a firefox fennec open a website & when
>> webiste is opened then i KILL (Fennec) by calling finish, but i
>> couldn't see telemetry file created in this case, so i asked you above
>> query that how telemetry file is created.
>>
>> Is there any wayout for this problem statement, so that file is
>> created as soon as i call finish() i.e. after website is opened ?
>>
>>
>>
>> Thanks,
>> Ravi
>>
>> On Sun, Jun 22, 2014 at 9:34 AM, Kartikaya Gupta <[email protected]>
>> wrote:
>>> Hi Ravi,
>>>
>>> The code that saves that file is located at
>>> http://mxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetryFile.jsm?rev=8d3f9720851c#87
>>> The code is invoked from
>>> http://mxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetryPing.jsm?rev=28e4d5e18cf4#1102
>>>
>>> Hope that helps.
>>>
>>> Cheers,
>>> kats
>>>
>>> ----- Original Message -----
>>>> From: "Ravi Inder Singh" <[email protected]>
>>>> To: [email protected]
>>>> Sent: Sunday, June 22, 2014 12:27:14 AM
>>>> Subject: Fwd: Telemetry code query ...
>>>>
>>>> Hi all,
>>>> I have simple query on Firefox on android
>>>>
>>>> On Firefox Android code (Fennec), after each iteration i.e. opening a
>>>> website from Fennec after you close Fennec,it will auto generate a
>>>> telemetry file in your profile saved-telemetry-pings directory.
>>>>
>>>> This file generated is named as a random filename.
>>>>
>>>> So i want to know where in Fennec code how this file is generated,
>>>> which peice to code generates this file, from where it is invoked.
>>>>
>>>> I need to know to code path leading to this file generation.
>>>>
>>>> Any help or code pointer will be helpful.
>>>> Or if any documentation which can help i would appreciate that one also.
>>>>
>>>> Thanks,
>>>> -- Ravi
>>>> _______________________________________________
>>>> mobile-firefox-dev mailing list
>>>> [email protected]
>>>> https://mail.mozilla.org/listinfo/mobile-firefox-dev
>>>>
> _______________________________________________
> mobile-firefox-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/mobile-firefox-dev
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev