Share a text file

I would like to share a text file with all the possible objectives, but the invocation will automatically open an email with the file attached.

I can click on the attachment and select sharing, but I'd like to get this default selection.

What's wrong?

InvokeRequest shareRequest;
shareRequest.setAction("bb.action.SHARE");
shareRequest.setMimeType("text/plain");
shareRequest.setUri("file:///" + filePath);
invokeManager->invoke(shareRequest);

To answer my own question:

Instead of an InvokeRequest, you will need to use an InvokeQuery.

void DataServiceUtil::shareFile(QString filePath) {
  invocation = Invocation::create(InvokeQuery::create().parent(this).uri("file:///" + filePath));
  invokeActionId = "bb.action.SHARE";
  connect(invocation, SIGNAL(armed()), this, SLOT(onArmed()));
  connect(invocation, SIGNAL(finished()), invocation, SLOT(deleteLater()));
}

onArmed called simply relaxing on the invocation

Tags: BlackBerry Developers

Similar Questions

  • Is there a way to open the text files with arbitrary extensions?

    As part of the mobile platform iOS, is possible to open arbitrary text files that have an arbitrary extension?  For example, in the course of my work day, I meet regularly with plain text files that have an .out extension.  I'd love to be able to open these simply with iOS notes without renaming them in .txt.  I meet many of them and only need to do this for a few minutes, so take the time to rename them significantly adds both.

    On the desktop a BONE can generally "open with", then choose the application.   I'm looking for the equivalent in iOS.  Please note that to access the files on iOS is not a problem with icloud drive, dropbox, etc..  they just can not be opened easily.   Simple text editor, word processor not full blown.

    You will need a software that can handle the file.

    Usually the file management applications can manage any type of file.  I like the 5 Documents to Readdle, it can open almost anything.

    https://iTunes.Apple.com/us/app/documents-5-file-system-PDF/id364901807?Mt=8

    The equivalent of 'Open with' in the iOS is "open in", 'Share xxx' or even 'Copy To '.

    How to get to it, depends on where the file is located.

    ICloud drive for example, you can do open the file in a specific application by holding your finger on the icon of the file and by selecting more «...» "in the menu that appears, and then selecting"Share point... ". "and finally select an application from the list.

  • text file as config

    Hello world

    Once again I have some difficulty.

    I'm trying to control Goepel Cascon with my labview. What I basically want to achieve is:

    I want a configuration file that contains a part of the serial number of my share a name. The serial number is parsed as a string of alphanumeric one limited to the first 10 characters. Now, I want to find the line in the text file that this shorter string is also written in as the name that is separated by a tab number is supposed to be read by labview and transmitted.

    All this is necessary for my final program when the apllication is generated can be updated just by writing new things in a text file.

    Thanks for help.

    Michael

    It would be useful that you can attach the text file. Basically for your scenario, you can read the text file in a table 2D-string with 'Tab' as delimiter and find the serial number and the name of the party. Come back if you face any problem.

  • How to view the data in the text file to the format column

    Hello

    I am acquiring data from an oscilloscope.

    Wen I save the data in a text file to aid wite spreadsheet string, all the displayed voltage values r first, then values of time... in addition to its delimited by tabs

    How can I view it like the r of time values in a single column and the voltyage of the r-values in the other column

    thanx

    Hello

    I don't know what is exactly the format that you found. I think you should try to use the function Array transpose (from the palette of function table) before you pass the array to write to string of spread sheet function or directly loyal to Terminal son transposes on writing worksheet function and see if you get the desired results.

    PS. : Share your code would be appreciated.

    Kind regards

    Amine31

    (Kudos are always welcome, mark it as a solution if it is the only)

  • Dumping Variables in the text file, separate from the TS report

    Hi all

    I know that I can probably do this in TestStand using LabView, however, which is not a luxury that I have.

    What I'm trying to do is, when a failure occurs, empty a specific set of information in a separate (probably text file) log file share the standard test report.  For example, I could be followed by some tampons or test State of the equipment in stationglobals, when a test fails, I want to empty the part of the overall station in a different newspaper, once again, apart from test report, is it possible?

    Looks like the closest thing to research through TS and the support forums, I found is to use ActiveX calls to maybe MS Word or Excel and generate something there?  I was expecting something a little simpler?

    Kind regards

    Mike

    Hi Mike,.

    Try this:

    Write, method

    Syntax

    PropertyObject. Write (pathchaine, objectName, RWoptions)

    Goal

    Writes the content of an object in the file specified by pathchaine and associate it with the name specified by ObjectName with the object in the file.

    Remarks

    If you call this method on an object alias, TestStand generates the stream using the object to which the alias refers. This method does not include the Subproperty alias objects in the stream. See IsAliasObject for more information on the alias objects.

    Parameters

    pathchaine String

    [In] Pass the path of the file to which to write the data of the object.

    objectName String

    [In] Pass the name to associate with the object.

    RWoptions Both

    [In] Pass 0 to specify the default behavior, or pass one or more constants of ReadWriteOptions . Use the bitwise OR operator to specify multiple read/write options.

    For example, to make a statement in a sequence with local variables, and run:

    Locals.Write (C:\\temp\\Locals.txt","Locals",0" ")

    This will generate a text file containing the values of the local variables. You can use it on any object, but you will probably need to ask with the options to get what you want.

    I hope this helps.

    -Jack

  • Control of the authorization of sharing when writing to a text file

    I have several application that writes a file of text defined in a file share.  Another application, not a LabVIEW application then reads the delimited text file.  When my application is creating or writing to the file text delimited, is there a way to manipulate the permissions so that no other application can read the file at the same time, I am writing to you in the file?  I can do this in Visual Basic through the FileShare (http://msdn.microsoft.com/en-us/library/system.io.fileshare(v=vs.110).aspx) option during the creation of filestream, but I don't see this option in LabVIEW.  Thank you.

    Too bad.  I believe that this is possible thanks to the function of "deny access".

  • AppleScript to delete a text file

    Hi, here is a job Applescript that lists the contents of a folder and its subfolders to a text file named 'file inventory. The problem, for example, is that if a subfolder is emptied of files, the list of his previous content is always indicated in the text of the inventory of the last time file that the script is run. So, I would delete all of the text in the file until it is written again. I searched and found this code and put my name of file in there, but I can't make it work.

    Any help will be appreciated.

    expressions of folklore ": folder files inventory.txt" value 0

    property file_id: null


                  tell application "Finder" for the value this_folder for folder 'movies' from disk 'files '.

    the value log_file_path to ": folder files Inventory.txt.

    file_id value to open access file log_file_path with write permission

    Try

    write ('Start' & (current date) & back) to file_id

    my do_subfolders (this_folder, "")

    write (back & return) to file_id

    file_id of close access

    say "finished".

    we error error message

    file_id of close access

    errMsg say

                  end try

    on do_subfolders (this_folder, name_prefix)

    say application 'Finder '.

    Journal name_prefix & string (name of this_folder)

    write (back & name_prefix & (name of this_folder) chain ) to file_id

    the value File_List for each file in this_folder

    Repeat with this_file in File_List

    Journal name_prefix & "" & string (name of this_file)

    write (back & name_prefix & "" & (name of this_file) chain ) to file_id

    end Repeat

    the value folder_list for each folder in this_folder

    Repeat with this_subfolder in folder_list

    my do_subfolders (this_subfolder, "" & name_prefix)

    end Repeat

    end say

    end do_subfolders

    You are on the right track, but set the folklore expressions takes the file reference that you have already opened, not the path text.

    so, since you open the file via:

    file_id value to open access file log_file_path with write permission

    the appropriate solution would be:

    file_id of the folklore of the value to 0

  • Create the file CSV to edit the text file

    I am trying to convert an image list to a CSV file, so I can import it into a Web site. But the Web site importer does not recognize out of editing text in CSV. I am registering as a simple text file. When I create dummy data in a spreadsheet and the export to CSV is exactly the same when I opened in text editing, but it matter perfectly.

    Any ideas?

    The following thread might solve your issue.

    Text to CSV Editor

  • How can I put all the mail to a folder in a text file?

    I want to put all the lines of the object to a file (any file) in a text file for analysis of traffic.

    ImportExportTools

    How to install.

    Right-click on a folder, ImportExportTools/export all messages in the folder/just index (CSV or HTML).

  • I can no longer print to PDF for Firefox. I have Adobe Acrobat. I get now is a text file saying it did not work. Help, please!

    Here is the message from text file:
    %% [ProductName: Distiller] %.
    X8AEC0BD1 not found, by using the messaging service.
    %% [Error: invalidfont;] [OffendingCommand: show] %.

    Battery:
    ()

    %% [Flushing: rest of job (end of file) will be ignored] %%.
    %% [Warning: PostScript error.] No PDF file produced. ] %%

    What print driver are you using to print to PDF. Firefox is not any printer to print a page in PDF format.

    I use CutePDF , if you are interested. It's free.

  • How can I save an email as a text file before you delete it my Inbox?

    Some emails I want to save on my computer so that I can view without opening to the top of my email. I'm used to be able to do this by registering in a document as a text file folder. (Outlook express). I don't find this capablity in Thunderbird. If it is there, I have not found it.

    File | Register under gives you several options. By default, it will save in an .eml file, which will need an e-mail client to display. You can usually save drag-and-drop, but that creates an .eml file too.

    You can save as HTML by putting in a file html extension when you do file | Save as.

    This add-on:

    https://NIC-NAC-project.org/~kaosmos/mboximport-en.html

    offers several options to save one or more messages in different formats.

  • How can I convert a page typed into an editable text file

    How can I convert a page typed in an edible text file? I have a 50 page typed (on a typewriter ;-) document I want to convert (scan?) in a format so that I can then open the file in a text editing application (Word?) and edit.

    How is the most effective (and least expensive) way to do it?

    Thank you

    HAL

    < re-titled by host >

    "Edible text file?" You hear as he print on rice paper, so you can serve it up like at dinner side dish? You want someone to eat their words

    I think that the last two multifunction printers, I bought came with some kind of OCR characters (OCR) software as part of the sweeping package.  I guess that's not the greatest.

  • Our clients have trouble downloading a text file (.txt) on our website version 33.0 (using a filestream);

    Our clients have trouble downloading a text file (.txt) on our site version 33.0 (using a filestream). It worked well in previous versions.

    The error message they get reads as follows:
    {name of file and download user path} not can be saved, because the source file could not be read.

    Thank you
    Mike

    It is an old relative to corrupted downloads (http://kb.mozillazine.org/Source_file_could_not_be_read) error message, but has become more widespread in Firefox 33.

    To make a long story short... before, if the server sent a response which was smaller than the specified size, the gap has been ignored and the download was considered to be very good. From Firefox 33, a file that is smaller than the specified size is considered as being damaged.

    This comment in the bug tracking system has more information: https://bugzilla.mozilla.org/show_bug.cgi?id=1083090#c8

  • Automator: using a text file to set several items from the finder?

    Hello

    what I would do:

    I have a text file that contains multiple entries for files and folders, each on a separate line. I want to dragndrop this file on an automator action, he should ask me a destination folder and then copy all the files and folders in this folder.

    I have my action, automator, set up like this:

    Elements of the open Finder

    Get the content of the TextEdit Document

    Copy to the Clipboard (I have not found another way to keep my text sort file values and let it not be crushed by the following, but it works)

    Quit the Application (TextEdit)

    Ask the Finder items (this requires a destination folder)

    Set the value of the Variable (Destination)

    Get the contents of the Clipboard

    Copies the items from the Finder (at Destination)

    It all works, but only when there is 1 entry in my text file. As soon as I have 2 lines of text, I get the following error message:

    The action "copy Finder items" has not provided with the required data.

    How can I make this work with multiple entries?

    The problem is that you only pass the only element to the copy action (you have copied text), instead of an element for each line (paragraph) in the text.  The solution is to use the action filter paragraphs to break up along the borders of paragraph text, which will give you a list of items.  In addition, you do not necessarily have to use TextEdit or the Clipboard - If you already have a file somewhere, you can simply use the action to combine text files to read the text.

    With the above modifications, your workflow should look like:

    Ask the Finder items  (ask for a destination folder)

    Set the value of the Variable  (Destination)

    Ask the Finder items  (Download text files) - set the action to ignore the entry

    Combine text files  (read the text files)

    Filter paragraphs  (paragraphs which are not empty return)

    Copy the items to the Finder  (at Destination)

  • USB for my iPhone, so it can read a text file

    Hi, I would like to be able to connect a standard USB to my iPhone, so it can read a text file from USB, any suggestions on cable/apps? Thank you, Tony

    Hello. In fact, you can use any USB adapter to connect your iPhone to the computer and transfer text files. Apple recommends the adapter like this http://www.apple.com/shop/product/MD820AM/A/lightning-to-micro-usb-adapter

Maybe you are looking for

  • Why my FireFox went painfully slow/Not responding since the last update?

    Since the last update Firefox doesn't want to just not worked for me, most of the Web pages take 20 to 30 seconds to load, and often it will simply not respond and take a minute to load, and when he does have a script error that for google images wil

  • iPod classic 160 GB says no music after synchronization

    I have an old iPod classic 160 GB that has worked well for years. But suddenly, last week, while he was trying to put in new music (right now I have about 18 000 songs, more or less) he began to have problems with synchronization. After having tried

  • Satellite L670-1jQ - HDMI problem

    Hello I bought a brand new Satellite L670-1JQ especially for the blu - ray, HDMI output. I also have a screen 42 "flat with HDMI input jack.The meaning was to play a blu - ray on the laptop drive and transfer the video to the flat screen.When I conne

  • ATI Radeon HD 6550

    ATI Radeon HD 6550 drive for windows8

  • Error Windows vista update 8024401 b

    After you have selected the updates when I click on download and install, the download fails with a 8024401 b error code. Help, please.