You don't need to write a recogoniser. A recogoniser is used to associate a file type with a specic app, in the same way the extension is used in windows to do it. You would need to write one if say your app played MP3s, and you wanted the lauching of an MP3 to start your app.
You question sounds to me more like you want to do the lauching. So you want to open an MP3, and have it open in what ever app is associated (via a recog.) with it. Is that correct?
If so, take a look at RApaLsSession::StartDocument in the SDK.
I have also applied documenthandler.h but i m getting error cause tool abort..(so many linking error associated with function where i have used documenthandler for launching sound files(playing)... Now how coudl i furnish it......... Any help??&&&& Any light on this problem.. Thanks
You will have to NewL one before you use it - you can't just deference a NULL/invalid pointer and pass that. The usual key is if a function takes a "CClass&" then you construct it, if it takes a "CClass*&" then it will construct it for you.
Forum posts: 83
c0deab1e
Forum posts: 45
Can u please give me some examples or more details how i have to write a recognizer.
Forum posts: 1379
You question sounds to me more like you want to do the lauching. So you want to open an MP3, and have it open in what ever app is associated (via a recog.) with it. Is that correct?
If so, take a look at RApaLsSession::StartDocument in the SDK.
didster
Forum posts: 723
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 45
Thanks a lot
How do i get the icon of the associated application?
Regards,
Prabhu
Forum posts: 1379
didster
Forum posts: 239
I have also applied documenthandler.h
but i m getting error cause tool abort..(so many linking error associated with function where i have used documenthandler for launching sound files(playing)...
Now how coudl i furnish it.........
Any help?
Thanks
---------------
Bhatt Kavita
Forum posts: 723
tOtE
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 45
Hi,
I have problem in getting the ICON.
CApaMaskedBitmap* aAppBitmap;
ret = RPASession->GetAppIcon(uid, TSize(13,13), *aAppBitmap);
Is something wrong in the above code.
Forum posts: 1379
didster
Forum posts: 45
Thanks for ur reply.
The way the CApaMaskedBitmap is passed is correct?
or i have to create an object using NewLC and then pass the object to the function.
Regards,
Prabhu.
Forum posts: 1379
didster
Forum posts: 45
{
CApaMaskedBitmap aAppBitmap = CApaMaskedBitmap::NewLC();
CArrayFixFlat<TSize> *aArrayToFill = new CArrayFixFlat<TSize>(3);
RPASession->GetAppIconSizes(uid, *aArrayToFill);
RDebug::Print(_L("%d"), aArrayToFill->Count());
ret = RPASession->GetAppIcon(uid, (*aArrayToFill)[0], *aAppBitmap);
}
THis is the code iam using but the app crashes.
Please help me.
Forum posts: 1379
I'd do it like this:
RApaLsSession aLs;
User::LeaveIfError(aLs.Connect());
CleanupClosePushL(aLs);
CArrayFixFlat<TSize>* array=new(ELeave) CArrayFixFlat<TSize>(3);
CleanupStack::PushL(array);
User::LeaveIfError(aLs.GetAppIconSizes(uid,*array));
for(TInt i=0;i<array->Count();i++)
{
CApaMaskedBitmap* iconBySize=CApaMaskedBitmap::NewLC();
if(aLs.GetAppIcon(KUidTestApp,(*array)[i],*iconBySize) == KErrNone)
{
// icon is now iconBySize
}
CleanupStack::PopAndDestroy(iconBySize);
}
CleanupStack::PopAndDestroy(array);
CleanupStack::PopAndDestroy(&aLs);
didster
Forum posts: 45
Thanks a lot
Its working now.