01-14-2013 01:19 PM
Thanks!
I will try it tonight using "text/plain" to share a text to all possible targets. It should be nearly the same? (data instead of uri)
Would be great to post a warning if I will fail when replacing the "image/png" with "text/plain", otherwise thanks for the post. ![]()
Since you're a Admin, could you trigger please the right person to update
https://developer.blackberry.com/cascades/document![]()
01-17-2013 07:19 AM
Hi all!
I'm trying to do the same in C++, but only BBM Groups option appears. The same configuration in QML works fine and show multiple options.
InvokeManager invokeManager;
InvokeRequest request;
request.setAction("bb.action.SHARE");
request.setMimeType("text/plain");
request.setData( QString(title + " "+ link).toUtf8());
invokeManager.invoke(request);
Can anyone help me?
01-17-2013 09:43 AM
sgallego84, refer to my code a few posts back in this thread.
01-17-2013 10:18 AM
Thanks a lot!
I think documentation about this action is not very clear...
Regards!
03-27-2013 04:16 AM
I have followed MSohm indications to share a QString:
Invocation *m_pInvocation = Invocation::create(
InvokeQuery::create().parent(this).mimeType("text/ plain").data(
QString(title + " " + link).toLocal8Bit()));
QObject::connect(m_pInvocation, SIGNAL(armed()), this, SLOT(onArmed()));
QObject::connect(m_pInvocation, SIGNAL(finished()), m_pInvocation,
SLOT(deleteLater()));
I'm sharing spanish news titles, and some of them have accents. If I use UTF-8 encoding, email sharing doesn't show accents ok. If I use Latin1 or similar encoding, BBM and SMS sharing doesn't show accents ok... What can I do?
I have try:
.toLocal8Bit()
.toUtf8()
.toLatin1()
.toAscii()
Regards!
03-27-2013 04:35 AM
Same troubles for me with unicode characters...
Do you use the lastest ndk ?
03-27-2013 04:55 AM
I have seen this issue, but the problem here is other...
Is like email app requires ascii encoding and SMS and BBM app requires UTF-8 encoding...
03-27-2013 01:00 PM
I've the same problem with my App. I'm unable to share arabic encoded text to a email. ![]()
04-01-2013 02:22 AM
Any idea??
04-01-2013 02:33 PM
Text in QML is not in UTF-8 format. Here's a workaround that allows you to use UTF-8 characters with accents in an invocation object.
QML:
InvokeActionItem {
ActionBar.placement: ActionBarPlacement.OnBar
id: invokeTest
title: "Share - C++ Formatted Data"
query {
mimeType: "text/plain; charset=utf-8"
invokeActionId: "bb.action.SHARE"
onQueryChanged: invokeTest.query.updateQuery()
}
onTriggered: {
data = cpp.encodeQString("Pourquoi ça ne marche pas?");
}
}
C++:
QByteArray BBMShare::encodeQString(const QString& toEncode){
return toEncode.toUtf8();
}