Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi Can anyone help me how to get application usage and network usage statistics using BREW 2.0 . I know some API are available in BREW 3.1 but not able to find in BREW 2.0. Is there any other way of retrieving those information in BREW 2.0?

Thanks in advance...

What exactly are you looking for in terms of usage statistics?

What exactly are you looking for in terms of usage statistics?

Kiran Kumar. T wrote:Hi Can anyone help me how to get application usage and network usage statistics using BREW 2.0 . I know some API are available in BREW 3.1 but not able to find in BREW 2.0. Is there any other way of retrieving those information in BREW 2.0?
Thanks in advance...
Try NetDiagnostic example.. it would give you hint about application and network usage.. good luck

Kiran Kumar. T wrote:Hi Can anyone help me how to get application usage and network usage statistics using BREW 2.0 . I know some API are available in BREW 3.1 but not able to find in BREW 2.0. Is there any other way of retrieving those information in BREW 2.0?
Thanks in advance...
Try NetDiagnostic example.. it would give you hint about application and network usage.. good luck

Thank you very much Max and Bangis
I want to retrieve the application usage and net usage statistics of any application(those already downloaded to handset) from my application.
App usage statistics such as number of times it run, application usage time etc
Net usage statistics such as number of KBs retrieved and sent.
Is there any way of retrieving those information in BREW 2.0?
Thanks in advance...

Thank you very much Max and Bangis
I want to retrieve the application usage and net usage statistics of any application(those already downloaded to handset) from my application.
App usage statistics such as number of times it run, application usage time etc
Net usage statistics such as number of KBs retrieved and sent.
Is there any way of retrieving those information in BREW 2.0?
Thanks in advance...

ahhh.. what you mean is... you want to build an application that checks every application that's executed in a handset? isn't it!?
try to IMPLEMENT functions that's included in higher VERSION of BREW. you said that BREW 3.1 supported it right!? good luck!

ahhh.. what you mean is... you want to build an application that checks every application that's executed in a handset? isn't it!?
try to IMPLEMENT functions that's included in higher VERSION of BREW. you said that BREW 3.1 supported it right!? good luck!

No, this is not possible in BREW 2.0. In BREW 3.x you can get application usage information with IAppHistory.

No, this is not possible in BREW 2.0. In BREW 3.x you can get application usage information with IAppHistory.

Hi Max,
Thank you very much for your reply.
I have gone through the IApphistory API but didn't understand what information can I retrieve using it? Could you please give me steps to get the app usage and net usage information of any application using IAPPHISTORY API?
Between
I tried using ISHELL_GetProperty() using MPROP_USAGE & MPROP_NETUSAGE as parameters but getting null values for both AEEAppUsage and AEENetUsage. I am using BREW 3.1.3 simulator. Does this API work on Simulator or Do i need to test on Handset?
Please help me.
Thanks & Regards,
Kiran Kumar Tedla

Hi Max,
Thank you very much for your reply.
I have gone through the IApphistory API but didn't understand what information can I retrieve using it? Could you please give me steps to get the app usage and net usage information of any application using IAPPHISTORY API?
Between
I tried using ISHELL_GetProperty() using MPROP_USAGE & MPROP_NETUSAGE as parameters but getting null values for both AEEAppUsage and AEENetUsage. I am using BREW 3.1.3 simulator. Does this API work on Simulator or Do i need to test on Handset?
Please help me.
Thanks & Regards,
Kiran Kumar Tedla

No, IAppHistory will not help you with network usage information...only application usage information.
With IAppHistory (or IAPPLETCTL) you can figure out all the applications that are running at any given time. This isn't really app usage information per se, but it allows you to determine some information that can be used to compile rough statistics.

No, IAppHistory will not help you with network usage information...only application usage information.
With IAppHistory (or IAPPLETCTL) you can figure out all the applications that are running at any given time. This isn't really app usage information per se, but it allows you to determine some information that can be used to compile rough statistics.

Thank you Max.
Could you please give me hint on ISHELL_GetProperty() API ? Can I retrieve the usage information by using AEEAppUsage and AEENetUsage of any downloaded application from my application? Will this API work on Simulator?
Thanks & Regards,
Kiran Kumar Tedla

Thank you Max.
Could you please give me hint on ISHELL_GetProperty() API ? Can I retrieve the usage information by using AEEAppUsage and AEENetUsage of any downloaded application from my application? Will this API work on Simulator?
Thanks & Regards,
Kiran Kumar Tedla

ISHELL_GetProperty() returning EPRIVLEVEL error in my code. What privileges do i need to give to access usage statistics?
Please help me.
Thanks in advance.

ISHELL_GetProperty() returning EPRIVLEVEL error in my code. What privileges do i need to give to access usage statistics?
Please help me.
Thanks in advance.

I believe it works on the Simulator, but ISHELL_GetProperty() will not help you out here.
From the API reference,
Quote:If getting a protected property (ex: MPROP_SID), then the caller needs to have System Privileges. For all other properties, the caller must belong to the same group as the class whose property is requested. i.e. either the calling app's classID is the same as cls or the module that contains the calling app belongs to the same groupID as cls. This can be done by listing cls as a dependency in the MIF of the calling app.
So, you need to be able to declare a dependency on all the applications you want to manage within your manage.

I believe it works on the Simulator, but ISHELL_GetProperty() will not help you out here.
From the API reference,
Quote:If getting a protected property (ex: MPROP_SID), then the caller needs to have System Privileges. For all other properties, the caller must belong to the same group as the class whose property is requested. i.e. either the calling app's classID is the same as cls or the module that contains the calling app belongs to the same groupID as cls. This can be done by listing cls as a dependency in the MIF of the calling app.
So, you need to be able to declare a dependency on all the applications you want to manage within your manage.

Hi All,
Is it possible to find Last Access date of all the MIF file residing in Brew Directory.
Thanks
Akshay

Hi All,
Is it possible to find Last Access date of all the MIF file residing in Brew Directory.
Thanks
Akshay

You can enumerate apps using ISHELL_AppletInit/ISHELL_EnumNextApp. To get usage stats like last used time, ISHELL_GetProperty with MPROP_USAGE can be used but this API was introduced in Brew3.1. See Brew 3.1 API reference for more details. As per as Brew 2.1 is concerned I don't think there is any such API.

You can enumerate apps using ISHELL_AppletInit/ISHELL_EnumNextApp. To get usage stats like last used time, ISHELL_GetProperty with MPROP_USAGE can be used but this API was introduced in Brew3.1. See Brew 3.1 API reference for more details. As per as Brew 2.1 is concerned I don't think there is any such API.

Hi,
I want to get some information about other applets residing on the handset through my applet. The information includes applet download date and application last used date.
Can somebody help in this direction?
Thanks

Hi,
I want to get some information about other applets residing on the handset through my applet. The information includes applet download date and application last used date.
Can somebody help in this direction?
Thanks

Merged threads....Please search the forums before posting....

Merged threads....Please search the forums before posting....

check out this code
int ret = 0;
uint16 nSize =0;
AEEAppInfo pAeeAppInfo;
ISHELL_EnumAppletInit(pCsample->m_pIShell);
while(ret = ISHELL_EnumNextApplet(pCsample->m_pIShell, &pAeeAppInfo))
{
ret = ISHELL_GetProperty(pCsample->m_pIShell,pAeeAppInfo.cls,MPROP_USAGE,NULL,&nSize);
if(!ret)
{
void *pBuff = NULL;
pBuff = MALLOC(nSize);
ret = ISHELL_GetProperty(pCsample->m_pIShell,pAeeAppInfo.cls,MPROP_USAGE,pBuff,&nSize);
ret = (int)pBuff;
DBGPRINTF("%d",(int)pBuff);
FREE(pBuff);
}
}
Here, ISHELL_GetProperty is always returning 1.
Can sb tell, what could be the problem?

check out this code
int ret = 0;
uint16 nSize =0;
AEEAppInfo pAeeAppInfo;
ISHELL_EnumAppletInit(pCsample->m_pIShell);
while(ret = ISHELL_EnumNextApplet(pCsample->m_pIShell, &pAeeAppInfo))
{
ret = ISHELL_GetProperty(pCsample->m_pIShell,pAeeAppInfo.cls,MPROP_USAGE,NULL,&nSize);
if(!ret)
{
void *pBuff = NULL;
pBuff = MALLOC(nSize);
ret = ISHELL_GetProperty(pCsample->m_pIShell,pAeeAppInfo.cls,MPROP_USAGE,pBuff,&nSize);
ret = (int)pBuff;
DBGPRINTF("%d",(int)pBuff);
FREE(pBuff);
}
}
Here, ISHELL_GetProperty is always returning 1.
Can sb tell, what could be the problem?

I need to add cls as a dependency in the MIF of the calling app but its possible only when we know the clsid of the other apps.
What if I want to add depency through code?
Is there some API available for adding depency?
Is there some way?
Please help.

I need to add cls as a dependency in the MIF of the calling app but its possible only when we know the clsid of the other apps.
What if I want to add depency through code?
Is there some API available for adding depency?
Is there some way?
Please help.

Not possible through Brew app.

Not possible through Brew app.

Are you taking care of this? From your code looks like no; try first with getting usage stat for calling applet itself (same applet).
From API reference...
The caller must belong to the same group as the class whose property is requested. i.e. either the calling app's classID is the same as cls or the module that contains the calling app belongs to the same groupID as cls. This can be done by listing cls as a dependency in the MIF of the calling app.

Are you taking care of this? From your code looks like no; try first with getting usage stat for calling applet itself (same applet).
From API reference...
The caller must belong to the same group as the class whose property is requested. i.e. either the calling app's classID is the same as cls or the module that contains the calling app belongs to the same groupID as cls. This can be done by listing cls as a dependency in the MIF of the calling app.

Thanks for the reply Atul.
Are you taking care of this? From your code looks like no; try first with getting usage stat for calling applet itself (same applet).
I tried using 0 in place of clsid so that it could retrieve information about the self applet but of no use. It's still returning 1.
ret = ISHELL_GetProperty(pCsample->m_pIShell,0/*pAeeAppInfo.cls*/,MPROP_USAGE,NULL,&nSize);
I've even tried hardcoding the clsid value here but still the problem exists.
From API reference...
The caller must belong to the same group as the class whose property is requested. i.e. either the calling app's classID is the same as cls or the module that contains the calling app belongs to the same groupID as cls. This can be done by listing cls as a dependency in the MIF of the calling app.
I tried to list the clsid of the other applets in the dependency of the calling applet, but still the propblem persists.
Where am I wrong? Please suggest........

Thanks for the reply Atul.
Are you taking care of this? From your code looks like no; try first with getting usage stat for calling applet itself (same applet).
I tried using 0 in place of clsid so that it could retrieve information about the self applet but of no use. It's still returning 1.
ret = ISHELL_GetProperty(pCsample->m_pIShell,0/*pAeeAppInfo.cls*/,MPROP_USAGE,NULL,&nSize);
I've even tried hardcoding the clsid value here but still the problem exists.
From API reference...
The caller must belong to the same group as the class whose property is requested. i.e. either the calling app's classID is the same as cls or the module that contains the calling app belongs to the same groupID as cls. This can be done by listing cls as a dependency in the MIF of the calling app.
I tried to list the clsid of the other applets in the dependency of the calling applet, but still the propblem persists.
Where am I wrong? Please suggest........

ISHELL_GetProperty() is not returning SUCCESS. Its returning 1(EFAILED).
I've set previlege and also set the dependency.
I'm using simulator.
Can sb help.........

ISHELL_GetProperty() is not returning SUCCESS. Its returning 1(EFAILED).
I've set previlege and also set the dependency.
I'm using simulator.
Can sb help.........

I found a clsid AEECLSID_USAGE_APP. Will this help?
How to use this?
Do I neet to use this somewhere in my code, I've tried using this in the mif's dependency but of no use.

I found a clsid AEECLSID_USAGE_APP. Will this help?
How to use this?
Do I neet to use this somewhere in my code, I've tried using this in the mif's dependency but of no use.

Getting info of self applet: you need to pass classid and not 0. I was able to get the usage info.
IShell_GetProperty returns EFAILED (1) if it is not able to find this property in the MIF of applet for which you are requesting it.

Getting info of self applet: you need to pass classid and not 0. I was able to get the usage info.
IShell_GetProperty returns EFAILED (1) if it is not able to find this property in the MIF of applet for which you are requesting it.

Using ISHELL_EnumAppletInit and ISHELL_EnumNextApplet, we get information about the apps available in the device but alongwith the downloaded apps, it also enumerates the system apps like calender, brewappmgr, and others.
Is there some way, I could enumerate only downloaded apps?

Using ISHELL_EnumAppletInit and ISHELL_EnumNextApplet, we get information about the apps available in the device but alongwith the downloaded apps, it also enumerates the system apps like calender, brewappmgr, and others.
Is there some way, I could enumerate only downloaded apps?

Hey,
I'm able to get information about the applet regarding its last used date and other info but it is available only through 3.x version. Can I retrieve the info using 2.x. ISHELL_GetProperty() is not available in 2.x. Is there some alternate option available?

Hey,
I'm able to get information about the applet regarding its last used date and other info but it is available only through 3.x version. Can I retrieve the info using 2.x. ISHELL_GetProperty() is not available in 2.x. Is there some alternate option available?

I don't think 2.x has any such APIs.

I don't think 2.x has any such APIs.

Can sb tell me what's the value that AEEAppUsage.dwLastUsedTime returns. I considered it as the time in milliseconds but after calculation I found that for every application on my device, it shows around 263 hrs which is wrong.
I guess now, the value returned is number of seconds since 1980/06/01. Can sb confirm or guide?
Thanks in advance

Can sb tell me what's the value that AEEAppUsage.dwLastUsedTime returns. I considered it as the time in milliseconds but after calculation I found that for every application on my device, it shows around 263 hrs which is wrong.
I guess now, the value returned is number of seconds since 1980/06/01. Can sb confirm or guide?
Thanks in advance

Correct, returns number of seconds since 1980/01/06.

Correct, returns number of seconds since 1980/01/06.

thnx atul for the guideline.

thnx atul for the guideline.