The context of invocation. Simple text sharing problem

Hello

I would like to have an option of sharing simple text on my request. To do this, I use this code in my. QML file:

ActionItem {
     attachedObjects: [
          Invocation {
               id: invoke
               query: InvokeQuery {
                    id: invokeQuery
                    mimeType: "text/plain"
                    data: "This is a text text"
               }
          }
     ]

     title: qsTr("Share")
     imageSource: "asset:///images/share.png"
     ActionBar.placement: ActionBarPlacement.OnBar
     onTriggered: {
          invoke.trigger("bb.action.SHARE")
     }
}

With the above text, I can see the hardcoded text appear in all applications that I can share for (bold line), however, if I use the following line to change the text dynamically to the current item of the list instead I get nothing. No text is common to all:

data: ListItemData.description

Do you have someone was able to share a dynamic text?

Thank you

Well, I managed to find a solution, but I had to use C++ instead of QML. You have here, just in case some of you have the same problem:

void MyApp::share(QString name, QString surname, QString age)
{
     printf("Share invoked");

     m_pInvocation = Invocation::create(
          InvokeQuery::create()
           .parent(this)
           .mimeType("text/plain")
           .data(name.toUtf8() + surname.toUtf8() + age.toUtf8()));
      QObject::connect(m_pInvocation, SIGNAL(armed()),
        this, SLOT(onArmed()));
      QObject::connect(m_pInvocation, SIGNAL(finished()),
        m_pInvocation, SLOT(deleteLater()));
}

// Declare the following method as SLOT on your .hpp file
void MyApp::onArmed() {
    m_pInvocation->trigger("bb.action.SHARE");
}

Tags: BlackBerry Developers

Similar Questions

  • HTML content sharing - the context of Invocation and Facebook

    Hi all

    I would like to share content to Facebook HTML using Webworks and the framework of the call. No problem with a text/plain content, but I need something more... do you know guys if it's feasible or not?

    I saw no examples on this subject or on the official documentation on Git...

    Thank you very much

    -marco

    Thank you, good

    If it is not currently possible with the framework to invoke. You can share either text or an image. Not both at the same time.

    The only solution I know is to manage sharing using OAuth. It's just a little more work to use the invoke framework but will work. We have posted examples to use OAuth for Twitter and Facebook that would probably be a huge help in this case.

    https://github.com/BlackBerry/BB10-WebWorks-samples/tree/WebWorks-2.0

  • Brain dead on the addition of a simple text bearing...

    Hi there-

    As my title suggests, I'm having a problem. Captivate 8. I have an interface with a set of graphic buttons, and a whole hidden labels associated with snow. Clicking a button will slide in this topic. I want to use a rollover event dated to show the legend that disappears in slowing. I work in a sensitive project. Optimal (and historically) I would just use the legend in relation to the rollover button state. However, I don't see how Captivate 8.

    Hello

    Delicate design is for the production of HTML5 only. Transfers are not supported for HTML5, AFAIK. How do you make a turnover on a smartphone? You can check the Tracker of HTML5 (Project menu), which will tell you what objects are not supported (also was the case in previous versions).

    Tip/Success/Failure captions are not over bearing, sorry.

    Lilybiri

  • Sequence step results in the report in Simple text format

    I use Teststand 2012 and that you have installed the plugin from model simple text report.

    My main test sequence called a number of subsequences that contain the test steps and contain also several subsequences. A number of the subsequences is only stocks. My test result file contains all the results of measures of test as expected, but it also contains a line of output for each call of sequences - makes it difficult to see the results that count. I would only record the test steps.

    Looking at the code SimpleTextReport.dll in CVI I see it is stepping into the results and updated list in the form of each line (I changed some of the formatting). Is this the right place to filter the levels of appeal of sequence or can I stop the call sequence steps to be added to the list of results?

    You can put it in the sequential model. Just use ProcessModelPostResultListEntry with the same code. If it's in the template, you won't need it in other files. In addition, he is probably already stuff in the model. You'll have to code around it. This is how they do it on the fly.

  • configuration of the plugin simple text report

    I am updating a project of Teststand 4.2 for 2012. The original was a text via a report updated the sequential model and ICB code. I have trying to find current best practices to achieve a similar report.

    I installed the plugin to report simple text example but can find no documentation on how to configure it.

    The example works fine, but the columns have no limits or the measured value and have other items that I didn't need.

    Looking through the code I can see these are defined in the settings of the plugin, but I do not see where in my project to put.

    I'll also have to configure the report header and the name of the file.

    David

    What exactly do you mean by "key values"? Are you referring to the Key property in the NI_SimpleTextReport_CVI.seq?

    In order to get the type of comparison of a numerical limit test, for example, you can use an Expression like this post:

    Locals.ComparisonType = Step.Comp

    This would amount to "FROZEN".

    Regarding the addition of the results of the report, the key values are a string of research compared to a result object. In this case, you can add what you want to log on to the other results of this approach. Then, you can add a new column to the report in the NI_SimpleTextReport_CVI.seq file and the value of the key:

    AdditionalResults ["NameOfAdditonalResult"]

  • Executable error Excel VI simple text

    I have just upgraded to Windows 7 today and that you have installed Labview 2009 on the machine. Some of the VI, I must support using the vi simple text Excel. When I go to test my changes, my VI States that the Excel sub vi simple text is not executable. I am at a loss. This who could I have missed in the installation?

    Hi BadAzzS10,

    The assumption that it had to do with Excell 2010 is correct. The 2009 edition of the report generation toolkit is only compatible with the versions of MS Office 2007.

    Here is an article in the knowledge base that passes on the compatibility of the reporting tool.

    Report Generation Toolkit compatibility with Microsoft Office and LabVIEW

    If you have two options.

    -You can upgrade to LabVIEW 2010 toolkit and reporting 2010 (gen 2010 report does not work with LabVIEW 2009)

    or

    -Install MS Office 2007 on your computer.

    It is possible to have two versions of MS Office on the same machine so that you won't lose MS 2010 by doing this, however the steps that Microsoft gives an overview on their website.

    How to run multiple versions of Office on one computer

  • Beyond a simple text on the Clipboard in the text using the key field

    Dears

    You would tell me is it possible of past a simple text on the Clipboard into a field of text using button with javascript or something else?

    What is my problem?

    I have prepared a simple form using adobe acrobat dc. This form will be used in the local network. so, we can open the form of google chrome. There is a large text field in this form and we have passed the text to the Clipboard in there.

    normal, when we are using adobe acrobat to open the form, it is easy to right click and select "PASTE". but we need open the form using google chrome. in this case, no item to paste from the Clipboard.

    Please help me.

    Concerning

    In General, no, it's not possible.

    However, if you apply a certain change in the registry then work could . I told you how do it here: paste it from the Clipboard text box in form

  • former Illustrator files will open only in the form of Simple Text Documents

    I went back to an old project Adobe Illustrator I have not opened for years but suddenly need to recovery. To my horror, I discovered that I can not open ONE of these old files HAVE. In the finder, each of these files is shown not as an .ai file, but as a "simple text document. When opening, it does is display a text code page, not my graphics HAVE. I'm currently running AI CS5 on Mac OSX 10.8.5. I would greatly appreciate all useful advice - what someone might have on this subject. Y at - it HAVE a plug-in available for update old files? No matter what?

    Thanks for your help!

    Frank Gresham

    Hi everyone who responded, or interested:

    I think I found the fix, courtesy of the Mac guru at the University where I teach. If I just add the suffix .ai on behalf of all of my files, they instantly change to read Adobe Illustrator files! Couldn't be simpler, although it raises a question. These files will open very well without needing to be done with the file at the end of each title designations. Now, suddenly, they need ".ai" after them to open properly. Well. At least, I have a solution to this problem.  Thanks for all the good advice!

    Frank G.

  • Right click on the search bar, if there is already text inside, will bring up search suggestions in the context menu.

    Right click on the search bar, if there is already text inside, will bring up search suggestions in the context menu.

    This occurs when the search box had NOT been developed. Sometimes if there is search visible replacement engines.

    I find cela bug/annoyance.

    Hello m4lvolio, thank you for reporting this issue.
    However, it is a mainly managed by the community support forum, probably isn't the right place to report bugs (we are unable to implement all the features & devs read here).
    If you think this is a bug in the browser (and I can reproduce the issue certainly), please fill in a bug at bugzilla.mozilla.org.

  • For Windows XP (KB2719985) security update will not be installed. The text "a problem on your computer is preventing the updates being downloaded or installed" is reported

    For Windows XP (KB2719985) security update will not be installed. The text "a problem on your computer is preventing the updates being downloaded or installed" is reported. Fix - it crashes too much with the line "invalid command line" when I try to run it.

    Hello

    1. this problem occurs only with this particular update?

    2 did you change on your computer before this problem?

    You can follow the suggestions and check out them.

    Method 1

    You can reset the Windows Update components.

    How to reset the Windows Update components?
    http://support.Microsoft.com/kb/971058

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following windows Help article.

    How to back up and restore the registry in Windows XP

    http://support.Microsoft.com/kb/322756

    Method 2

    You can read the article.

    You cannot install some programs or updates

    http://support.Microsoft.com/kb/822798

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following windows Help article.

    How to back up and restore the registry in Windows XP

    http://support.Microsoft.com/kb/322756

    Method 3

    Step 1:

    Place the computer in a clean boot state.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Note: After you have used the boot is a way to solve your problem, you can follow these steps to configure Windows XP to start normally.

    a. click Startand then click run.

    b. type msconfigand click OK.
    The System Configuration utility dialog box appears.

    c. click on the general tab, click Normal Startup - load all device drivers and servicesand then click OK.

    When you are prompted, click restart to restart the computer.


    Step 2:

    Download and install the update from the link.

    Update security for Windows XP (KB2719985)

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=30282

    See also:

    Solve common installation issues in Windows Update, Microsoft Update and Windows Server Update Services

    http://support.Microsoft.com/kb/906602

  • Problem VLC media player - option of the context menu "add to vlc media player playlist" disappear in the selection of multiple files.

    OK, here's my problem. I installed VLC. It works very well. I have 'Add to playlist in vlc meadia player' on the pop-up menu file.

    PROBLEM: If I select more than 16 files and then "Add to vlc meadia Player playlist" disappear from the file context menu.

    ANNOYING: This stupid Windows Media Player is still there.

    QUESTION: Why vlc disappear from the file context menu if I select more then 16 files but wmp doesn't?  Is M$ trying to force people to use WMP?

    I also did my OWN program and he added in the context menu, and I discovered that my OWN program has also 16 files limit.

    Why windows deletes non MS program context menu, if I select more than 16 files? How can I solve this problem? I want to have my custom context menu program, even if I select more than 16 files.

    How to fix this?

    Hello
     
    I ask you to post this question on the Microsoft Development Network forums.
    Here is the link:
    http://social.msdn.Microsoft.com/forums/en/windowspro-audiodevelopment/threads
     
    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Webview from landscape orientation to portrait mode causes the font size to become smaller and a problem with the context Menu

    Hi, I have a webview with inline html. It works fine except that when I pass in landscape mode, the screen fills fine and the police grows, but when I go back to portrait fonts are tiny, even smaller then when initially in the portrait. I am installing this on a Z10 with cascades 10.1 SDK. Is this a Bug somewhere in the SDK or BB10?

    Another problem I have is in Web mode, the shortcut menu appears when I touch a Word. I is no need to use the context menu. How can I get rid of him. In the case where I would like to someday use this menu, I would need to add code to it. I can't find the code. Where can I find it?

    Thanks for your help

    Concerning

    Roland

    I' to propose taying far WebView as much as possible and using TextArea (with type HTML). There are still a few bugs present in WebView that make it unpleasant to use.

    You cannot get rid of the context menu, so it will disappear once you remove WebView. You can still share with other methods.

    This may seem more work and it's probably, but it's going to do to improve the user experience and fewer headaches for you.

  • simple text to the acceptability of url?

    I want to convert the spaces containing simple text, url, so that he can bhi added to the browser

    as I am adding text to share the Tweets: TWITTER_URL + "Hello this is sample text."

    But how can I convert the string in characters acceptable browser?

    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStreamWriter;
    import java.io.UnsupportedEncodingException;
    
    /**
     * Adapted from J2SE java.net.URLEncoder.
     */
    public class URLEncoder {
    
      public static String encode(String s, String enc)
        throws UnsupportedEncodingException {
    
        boolean needToChange = false;
        boolean wroteUnencodedChar = false;
        int maxBytesPerChar = 10; // rather arbitrary limit, but safe for now
          StringBuffer out = new StringBuffer(s.length());
        ByteArrayOutputStream buf = new ByteArrayOutputStream(maxBytesPerChar);
    
        OutputStreamWriter writer = new OutputStreamWriter(buf, enc);
    
        for (int i = 0; i < s.length(); i++) {
            int c = (int) s.charAt(i);
            //System.out.println("Examining character: " + c);
            if (dontNeedEncoding(c)) {
            if (c == ' ') {
                c = '+';
                needToChange = true;
            }
            //System.out.println("Storing: " + c);
            out.append((char)c);
            wroteUnencodedChar = true;
            } else {
            // convert to external encoding before hex conversion
            try {
                if (wroteUnencodedChar) { // Fix for 4407610
                    writer = new OutputStreamWriter(buf, enc);
                wroteUnencodedChar = false;
                }
                writer.write(c);
                /*
                 * If this character represents the start of a Unicode
                 * surrogate pair, then pass in two characters. It's not
                 * clear what should be done if a bytes reserved in the
                 * surrogate pairs range occurs outside of a legal
                 * surrogate pair. For now, just treat it as if it were
                 * any other character.
                 */
                if (c >= 0xD800 && c <= 0xDBFF) {
                /*
                  System.out.println(Integer.toHexString(c)
                  + " is high surrogate");
                */
                if ( (i+1) < s.length()) {
                    int d = (int) s.charAt(i+1);
                    /*
                      System.out.println("\tExamining "
                      + Integer.toHexString(d));
                    */
                    if (d >= 0xDC00 && d <= 0xDFFF) {
                    /*
                      System.out.println("\t"
                      + Integer.toHexString(d)
                      + " is low surrogate");
                    */
                    writer.write(d);
                    i++;
                    }
                }
                }
                writer.flush();
            } catch(IOException e) {
                buf.reset();
                continue;
            }
            byte[] ba = buf.toByteArray();
            for (int j = 0; j < ba.length; j++) {
                out.append('%');
                char ch = CCharacter.forDigit((ba[j] >> 4) & 0xF, 16);
                // converting to use uppercase letter as part of
                // the hex value if ch is a letter.
    //            if (Character.isLetter(ch)) {
    //            ch -= caseDiff;
    //            }
                out.append(ch);
                ch = CCharacter.forDigit(ba[j] & 0xF, 16);
    //            if (Character.isLetter(ch)) {
    //            ch -= caseDiff;
    //            }
                out.append(ch);
            }
            buf.reset();
            needToChange = true;
            }
        }
    
        return (needToChange? out.toString() : s);
      }
    
     static class CCharacter {
        public static char forDigit(int digit, int radix) {
          if ((digit >= radix) || (digit < 0)) {
              return '\0';
          }
          if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) {
              return '\0';
          }
          if (digit < 10) {
              return (char)('0' + digit);
          }
          return (char)('a' - 10 + digit);
      }
      }
      public static boolean dontNeedEncoding(int ch){
        int len = _dontNeedEncoding.length();
        boolean en = false;
        for(int i =0;i< len;i++){
          if(_dontNeedEncoding.charAt(i) == ch)
          {
            en = true;
            break;
          }
        }
    
        return en;
      }
      //private static final int caseDiff = ('a' - 'A');
      private static String _dontNeedEncoding = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -_.*";
    
      /**
       * @param args  test string
       */
      public static void main(String[] args) {
        String s = args[0];
        try {
          System.out.println(encode(s,"UTF-8"));
        } catch (UnsupportedEncodingException e) {
        }
      }
    }
    
  • Problem in the Internet by Wi - Fi connection sharing

    I used programs such as Virtual Wi - Fi and Connectify in the past to share my Internet connection. But recently, when I tried to do the same thing, I can't do it. My default internet connection is via ethernet. When I connect it to my laptop, it detects just like a LAN, then I again connect to the internet by entering the user name and password. So after you connect to the Internet, I'll have two connections, a LAN without internet access and others with access to the Internet.

    Now to share my Internet via Wi - Fi, which connection choose to allow this connection for internet sharing tab of the properties of share?

    Also when I install Connectify, Internet is disconnected. When I uninstall it, his work.

    I tried Virtual Wifi, its creation of a wifi connection to share my internet and I am able to connect to it, but the internet does not work.

    And then I tried to create ad - hoc wireless network, after giving a name, etc., there is no option to enable internet sharing on this network that usually does.

    How to solve this problem?

    Hi pradeepviswav,.

    Method 1
    Try the steps from the following link:

    Windows wireless and wired network connection problems
    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    Method 2
    Try the following steps to set up adohc network.

    Set up a computer-to-computer (ad hoc) network
    http://Windows.Microsoft.com/en-us/Windows7/set-up-a-computer-to-computer-ad-hoc-network

    Using ICS (Internet Connection Sharing)
    http://Windows.Microsoft.com/en-us/Windows7/using-ICS-Internet-connection-sharing

    Method 3
    Use one of the Internet by Wi - Fi connection sharing programs. If you use connectify, try the steps from the following link:
    http://support.Connectify.me/home

  • The context of the menu hard drive problems - cannot remove the point of garbage

    When right click on a drive (icon in the Explorer...) upwards appears familiar context menu.  The mine this counts as an item listed in the menu: \REGISTRY\]USERS\S-1-5-21... (many more numbers and letters).

    I tried all the obvious stuff, including transplant, without successful surgery - looking for the above string is futile. Manually check each Drive\shellex\ContextMenuHandlers.  Note that all other menus are very well.

    How can I get rid of this, and more importantly, how did get there in the first place?

    A second problem of context has also been raised: no Winrar command is listed. Notta.  Again, tried the obvious shots including UN and re - install Winrar.  A touch of Winrar is curiously the ContextMenuHandlers for folder, etc.  Why can't I see the usual orders of Winrar?

    I look forward your answers :)

    Without a subject "MISTLETOE" here, I've chosen 'Performance'... hope this is correct.

    I found the answer: by using a context menu editor, I have disabled all non-microsoft components.  This fixes the problem with context menus HD (disk), but (as it turns out that) some file types have the same string of garbage in their menus!  While the rar, flv, txt

    cfg files do not have this problem, exe, jpg, gif etc. are not! I applied the same method for the shortcuts in the menu "files" context and voila, it worked.

    The offending program is of Stardock Iconpackager. HOW and WHY it has messed up my menus, I have no idea, but I would ask people to Stardock for a response.

    See you soon

Maybe you are looking for