Cannot copy image from a url from an invocation

Hi, I do an application what and now work correctly, but I have a problem. When my application is called is reciving a url as follows:

file:///accounts/1000/invoke/com.MyApp.image.open/xa000000000000a/IMG_00000027.jpg

As you can see, this url points to an image, and is the uri from the received call parameter. At this stage I can show the image perfectly in my application (because it is invoked as a card in another application). The goal is to save the url of the image in a database for future access to the app. I tried to register the url because it is above, but now I understand why I could not properly gwendoline image (the stuff of card).

Then I tried the following:

void ApplicationUI::addRecord (const QUrl & url)
{
Create a new folder
QDir (QDir::currentPath() + "/ shared/photos/").mkdir("myApp");
Setting up the source url
QString from = url.toString ();
Setting up the destination path
QString = QDir::currentPath() + ' / shared/photos/myApp ";
Copy of the file
QFile::copy (from, to);
}

I have permission to access_shared. I didn't really now what's the problem with that. I'm kinda a noob and I'd appreciate your advice and help. Thank you!

Hello!

Thank you!

I achieve my goal like this:

void ApplicationUI::addRecord (const QUrl & url)
{
Create a new folder
QDir (QDir::currentPath() + "/ shared/photos/").mkdir("myApp");
Get the file and file information
QFile file (url.toString ());
QFileInfo fileInfo (file);
Setting up the source url
QString from = url.path ();
Setting up the destination path
QString = QDir::currentPath() + ' / shared/photos/myApp / "+ fileInfo.fileName ();
Copy of the file
QFile::copy (from, to);
}

Originally, I used QString from = url.toString () and got:

file:///accounts/1000/invoke/com.MyApp.image.open/xa0000000000058/IMG_00000066.jpg

Then I tried = url.path () QString and I got:

/ Accounts/1000/Invoke/com. MyApp.image.Open/xa0000000000058/IMG_00000066.jpg

In addition, I changed the setting to QString to QDir::currentPath() = + ' / shared/photos/myApp / "+ fileInfo.fileName ();

Small piece that I could copy the image.

Hope you find it useful!

Tags: BlackBerry Developers

Similar Questions

  • Cannot copy images from any type of disc. ??

    Cannot copy pictures on any type of disc. the computer behaves as if she is unable to format the drive? I thought that this was done automatically.

    Hello

    ·        What is the exact error that you are experiencing when you try to burn the disk?

    ·        Outside photos, you are able to burn other files on the disk?

    ·        You use any burning software to burn the photos to disk?

    Note: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    I suggest to format the drive and check if you are able to burn discs or not. Follow the steps mentioned below.

    a. be aware that Windows XP, in its native form, does not directly support CD formatting. Formatting a CD requires support for the ISO images that is missing from Windows XP.

    b. download or buy CD and formatting of third-party burning software. Third-party CD utilities include features like CD burning, imaging of CD and the CD put fit.

    c. install the third-party software, following specific instructions in accordance with the software documentation. Many programs will require you to restart Windows to complete the installation. Close all other applications and do it.

    d. place the disk you want to format in the drawer. Make sure that it is in the drawer of CD - R or CD - R/W and not another tray (tray of DVD) or a simple CD player.

    e. start the third-party application and follow the instructions on the screen as they appear. Choose the "Format CD" option on the file menu, or choose 'Create a new CD.' This application controls tend to vary an application to, so be sure to check the documentation.

    f. don't forget to leave the CD in the taskbar until the process is completely finished. If you remove the CD before the completion of the formatting, you will ruin the disc.

    g. give a volume name to your new CD.

    I also suggest you to check the article mentioned below.

    Should which CD or DVD format I use?

    http://Windows.Microsoft.com/en-us/Windows7/which-CD-or-DVD-format-should-I-use

    Note: This article also contains information about Windows XP.

    I suggest you run the fix it is present in the article below.

    Your CD or DVD drive cannot read or write media

    http://support.Microsoft.com/mats/cd_dvd_drive_problems/en-us

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • Cannot copy images from text to Photos

    (Running 1.3.5.1)

    When I get a picture ISO messase text, it allows me to see ad offers the possibility to 'copy of Photos ".  When you select 'Copy of Photos', he said is to do and refer you to the text message - but the photo is never actually copied.  Anyone see this behavior, or better yet know if it can be fixed?  Is this a bug in the OS?

    Mule

    Tagz - UPDATE!  It works, it was not just to put pictures where I expected them.  Is there a way to sort the most recent photos first?  I would have thought about it earlier that... :-)

    Mule

    Message edited by Mullet99 on 01/24/2010 09:39

  • Cannot copy files from HD to CD by using wizard.

    Original title: not accessible - incorrect function.

    Cannot copy files from HD to CD by using wizard. Have been able to do for a long time. Without warning is no longer possible.

    Hello

    The format of the files you want to copy basically described what kind of files they are. Word documents, of .mpg, jpeg, etc.
    However, it seems that the problem is with the drive itself, not individual files.

    You happen to have any installed Roxio program? Specifically, Roxio Easy CD Creator?
    If so, you should remove this program, restart the computer and try again.
    I hope this helps!
  • Cannot download images from Canon to the computer

    I have a new Dell running Windows 7.  I installed the software for my Canon PowerShot SD550 camera, but I can't download photos from my camera to the computer.  I tried to uninstall, but it won't let me.  Is this a compatibility issue.  I have a camera perfectly, and it saddens me to think that it is useless on Windows 7.  Any help would be appreciated.

    Original title: I have a camera Canon PowerShot SD550.  I installed the software on the new computer to Windows.  I can't download photos from my camera. 7

    Hello

     
    1. what happens when you tried to download images from the camera?

    2. do you get an error message?

    3. how you connect the device to the computer? What is USB?
     
    We have checked and checked the camera Canon PowerShot SD550 is compatible with Windows7.

    Method 1:

    Step 1: I suggest you to connect to another computer and check the issue.
     
    Step 2: Try to connect to another USB port and check with the question.
     
     
    Method 2: Run the troubleshooter of material
    Open the hardware and devices Troubleshooter
     
    Method 3:
     
    If you have connected the device via a USB port to the computer. Make sure that you follow these steps to download pictures from the Canon.
    a. turn on the Canon camera and put it in playback mode by pressing the button with the triangle "play" on this subject.
    b. plug the small end of the USB cable to the device and plug the other end into a USB port on your computer.
    c. click on the "Start" button in the lower left corner of your desktop and click on "my computer.» Double-click the icon of the gun in the left pane of the window "Workstation". If another file exists inside the folder of the Canon, so open that until you reach the image files.
    d. Select the files to be transferred to your computer. Hold 'Shift' click on the two separate files and it selects all of the files between the two. Otherwise, hold 'Ctrl' to select multiple files that are not adjacent.
    e. click on 'get images from the camera' If Windows recognizes the Canon as a camera 'Scanners and camera,' Wizard which will guide you through the download of your photos on your computer and remove them from your camera. Click on 'copy selected files' if 'get images' is not an option, this will open a dialog box where you select the location to which you want to download your photos.
     
    Let us know the results.
     
    I hope this helps.
  • Firefox 8, cannot copy text from any website

    When I select and right click to copy text from any Web site in firefox8, I have a large white screen. I had no problem until I upgraded to 8.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Cannot copy anything from a folder to another

    whenever I want to copy anything from one place to another a message if poster windows Explorer has encountered a problem and must close are can also be restored when I tried it please help me out from this problem

    AppName: explorer.exe AppVer: 6.0.2900.2096 ModName: kernel32.dll
    ModVer: 5.1.2600.2096 Offset: 00001d 24

    You can test the question via safe mode.

    In addition, you will need to adjust your system by running a check disk and a disk defragmentation.

  • Cannot transfer images from the camera and cell phone.

    Original title: print printer print

    I have a HP Photosmart C42oo all-in-one printer. It works fine and prints, but I can not all images of my little Kodak camera or my cell phone to my computer. It is as if the connection does not exist and in fact it s use to work perfectly until I get a new computer with windows 8. Can someone please help?

    Hello

    To provide the proper resolution, I would need more information on your side.

    1. what exactly happens when you try to transfer the images from the camera and cell phone?

    2 are the devices found on the computer?

    3. do you receive any error messages? If Yes, what is the exact error message?

    I suggest to use App Photos and to try the steps, click the link:

    Organize your photos
    http://Windows.Microsoft.com/en-in/Windows-8/organize-photos

    Please provide the necessary information to help you further, I'll be happy to help you.

  • Cannot copy files from C drive to external hard drive

    Original title: backup on external hard drive

    Can someone tell me how you back up C: drive of your computer on a hard drive external?  Unable to find mention of this anywhere.  Tried a right 'copy' but that doesn't seem to work.  Thank you.

    Hello

    1. what exactly is the error message you get?

    2. in which the reader is the installed operating system?

    Operating system files can be copied to another drive. If it is installed in the c drive, and if you try to copy as well, then try to copy only your personal files such as photos, emails.

    Respond with more information so that we can better help you.

    I suggest you to use the engine to find a software for creating image of your favorite search system.

    Warning: Using third-party software can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    You can also use the Windows Easy Transfer to transfer files.

    It automatically copy your files, photos, music, e-mail, settings, and more to your new Windows Vista PC based. This software allows you to transfer data with cables of simple transfer or through a network, external drive, or a CD/DVD.

    See the following site:

    Windows Easy Transfer for Windows XP

    http://www.microsoft.com/en-us/download/details.aspx?id=7349.

  • Cannot move images from album to album dif

    Impossible to return some photos of 1 album to another

    What specific album?

    Were the photos taken by or stored or were they synced to the device?

    You cannot move/delete photos that have been synchronized to the device

    If they were taken by or saved in the device (attachment) if yo remove and then the film, they will be deleted from the other albums, you copied them.

  • Cannot copy text from iBooks?

    Hi guys,.

    So, I'm currently learning Swift using the Swift Programming Language 2.2 of iBooks. However, it won't let me copy the text I want to run the code from the book to test inside. I could write this code myself but there are a few sections that I'd rather not.

    Anyone know why this is happening? In the past I was able to copy the text of the book, but now it is not letting me (it is grayed out).

    theboxmike wrote:

    However, it won't let me copy the text I want to run the code from the book to test inside.

    You cannot execute code in iBooks.

  • The VM cannot copy files from a network share on the host

    I get the error "unable to copy xyz123: cannot read from the source file or disk.» When you try to copy a file to a shared folder.

    • The shared folder is located on the machine called VM-SERVER, which runs in Workstation 6.0.4. The folder is shared with everyone having full control. Security settings say that DOMAIN\Domain users also have complete control.

    • Any user who connects to any guest VM on VM-SERVER, which is the host of all the VMS in the Organization, can not access the file for copying, although registration to the directory is there (although slow to come). If the same user connects to any other computer on the network, any computer of VM-no-prompt, then he can access the files on the share on VM-SERVER with no problems.

    • VM' are the guest all configured with Bridged networking like they serve other users on the network. I disable the VMWare adapters. I insert the DisableDos key with a value of 1 as indicated by the FAQ, I restart the VM host operating system and the virtual computer guests.

    • VM-SERVER running Windows Server 2003 R2 x 64. It has 2 1 TB SATA drives, and the action in question is physically located on the D: drive.

    • The VM guest OS are XP Sp3, Vista Sp1, Windows Server 2003 R2 x 32 Business.

    • None of these comments VM are able to access the contents of the files on the share on VM-SERVER.

    • All computer virtual guests are able to access shares located on another server, the primary domain controller of the network that is running Windows Server 2003 R2 x 32.

    Accordingly, I'm worried because the concept of the virtual computer for critical business was my decision and up to the exception of this scenario (and a recently resolved USB printing problem) it went well. Unfortunately even a mess can stop production.

    Note that I have read the FAQ and tried the suggestions that seemed to apply.  I also looked in the forums and haven't seen a specific question/answer.  If there is an answer out there and you read this point please make me, orperhaps you have another suggestion?  I am open to all theories and possible solutions.

    jorilla wrote:

    The card is a RealTek RTL8139/810 x Family Fast Ethernet NIC driver 5.699.717.2008 Version

    Maybe see if a new NIC driver help? I see that 5.707 (2008/11/24) seems to be available:

    http://www.Realtek.com/downloads/downloadsView.aspx?langid=1&PNid=6&PFID=6&level=5&Conn=4&DownTypeID=3&GETDOWN=false

    ====

    Is there anything in the event logs of the host?  I know that before I did this DisableDOS registry change on my server I've seen a lot of errors in the event log.

  • Cannot copy Photos from external storage library

    I want to copy my library of Photos of my iMac to an external storage device. I use an SD card to copy the files on as is the storage device external only I with sufficient capacity to store my library (21,86 GB). When I run the copy, all right, but eventually it stops about 21.5 GB (do not remember the exact number). It comes up with the error message "the Finder cannot complete the operation because some data in"Photo library"cannot be read or written. (Error code - 36) ». The library contains a very important image and video files and while I don't have a backup of it on my Time Capsule airport, I added a lot of files since then. One thing I found on other messages of the forum is to repair my library by pressing the command and option that I opened the Photos but I'm afraid that something can go wrong or could not even solve the problem, however if someone thinks he can do the trick I will try it. BTW - the SD card works fine as I tested it on my MacBook Air and it works for other files on my iMac. I also tried using a different SD card but had the same problems. I am running OSX 10.11 version (The El Capitan Public Beta Candidate GM). The reason why I have not yet updated to my computer because I'm worried cause more problems with my library of Photos and, as I said, my only relief is most likely is obsolete. I use an iMac late 2013 and I have had no other problems with my computer, or I do now with the current version, I'm running. Any help would be appreciated. Thank you in advance and wish you a wonderful Christmas.

    What format is the SD card?  The photo library can be on a volume formatted Mac OS extended (logged)

    and as for backups without a good current backup that you will lose data early as things do lack, including the hardware, software and human - you need a constant backujp as TimeMachine anytime

    LN

  • Cannot download images from camera olympus D-540 to my laptop IBM Thinkpad

    Hello

    I used to be able to do it, but not anymore. When I plug my camera into the usb port, it is said "a moment" and stays there. Also I do not see the camera in my computer (devices removable devices) when the camera is on. I have the XP version.

    I can do it on my other XP version computer desktop.

    It seems that the computer does not detect the camera.

    You have an answer?

    Thank you

    Gaston

    Hi, Gaston,.

    ·         Did you do changes on the computer before the show?

    ·         You receive an error message?

    Follow the suggestions below for a possible solution:

    Method 1: I suggest you to run the Microsoft fixit from link and check mentioned below.

     

    Hardware devices do not work or are not detected in Windows

    http://support.Microsoft.com/mats/hardware_device_problems/en-us

    Method 2: If the method above does not help, then you can consult the following articles and check.

     

    Peripheral USB is not recognized when you attach it immediately after that your Windows XP computer comes out of standby or hibernation

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

     

    A computer that is running Windows XP cannot detect a USB, an Apple iPod flash drive or an external hard disk drive

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

    Let us know if it helps.

  • Cannot transfer images from digital Canon to Windows Vista. received message "save file not found" "Cameras Windows DC. default download folder is "my images".

    I have been transferring pictures from my Canon Digital via the Canon software in a Windows "My pictures" file for about 2 years with great success.  Today, an attempt to transfer was interrupted with the message 'Save folder not found' "Cameras Windows DC.  I noticed that was missing the file "my images".  I added one, I reinstalled the Canon software, I tried to download the image using the "Windows Photo Gallery", but got the same message as above.  What can I do to be able to download the photos again?

    Do you know when this problem started?  Try a system restore to a point in time BEFORE the problem started.  Here is the procedure: http://www.howtogeek.com/howto/windows-vista/using-windows-vista-system-restore/.  Don't forget to check the box to show more than 5 days of restore points.  If the first attempt fails, then try an earlier point or two (he may have started before that you have noticed).  NOTE: You will need to re - install any software and updates that you have installed between now and the restore point, but you can use Windows Update for updates.

    If this does not work, please transfer your question in images and video Forum at: http://social.answers.microsoft.com/Forums/en-US/vistapictures/threads where the people who specialize in issues related to the image will be more than happy to help you with your problem.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

Maybe you are looking for