Remove the system memory images

I modified the sample application camera to send the image which is taken as an attachment to an e-mail.  Is there a way to remove the image after the email has been sent successfully?  Here's what I'm using right now:

try {

                // Create the connection to a file that may or may not exist.
                FileConnection file = (FileConnection)Connector.open( FILE_NAME + date + "_" + phoneID + EXTENSION );
                file.lastModified();

                // We know the file doesn't exist yet, so create it
                file.create();

                // Write the image to the file
                OutputStream out = file.openOutputStream();
                out.write(_raw);
                out.close();

                InputStream input = file.openInputStream();
                int available = input.available();
                String fileData = FILE_NAME + date + "_" + phoneID + EXTENSION;

                byte[] data = new byte[(int)file.fileSize()];
                input.read(data);

                Bitmap bitmap = Bitmap.createBitmapFromBytes(data, 0, data.length, 3);

                //create a multipart
                Multipart mp = new Multipart();

                //data for the content of the file
                String messageData = "Mail Attachment Demo";

                JPEGEncodedImage jpegImage = JPEGEncodedImage.encode(bitmap,100);
                //create the file
                SupportedAttachmentPart sap = new SupportedAttachmentPart(mp,jpegImage.getMIMEType(),date + "_" + phoneID + EXTENSION,jpegImage.getData());
                TextBodyPart tbp = new TextBodyPart(mp,messageData);

                //add the file to the multipart
                mp.addBodyPart(tbp);
                mp.addBodyPart(sap);

                //create a message in the sent items folder
                Folder folders[] = Session.getDefaultInstance().getStore().list(Folder.SENT);
                Message message = new Message(folders[0]);

                //add recipients to the message and send
                try {
                     Address toAdd = new Address("[email protected]","Image");
                     Address toAdds[] = new Address[1];
                     toAdds[0] = toAdd;
                     message.addRecipients(Message.RecipientType.TO,toAdds);
                     message.setContent(mp);
                     message.setSubject(date + "_" + phoneID + EXTENSION);

                     Transport.send(message);
                } catch (Exception e) {
                     Dialog.inform(e.toString());
                }

                // Close the connections
                file.close();
                input.close();

                // Increment the image counter
                ++_counter;

                // Return to the main camera screen
                UiApplication.getUiApplication().popScreen( _imageScreen );

            } catch(Exception e) {
                Camera.errorDialog("ERROR " + e.getClass() + ":  " + e.getMessage());
                Dialog.inform( " There was an error with the picture. Please take the picture again.");
                UiApplication.getUiApplication().popScreen( _imageScreen );
            }

Scratch all that.  I just had to use file.delete ().

Tags: BlackBerry Developers

Similar Questions

  • Cannot remove the temporary memory

    I am running XP with service pak 3, essentuas of microsoft (latest version) security & malwarebes, anti-alware and live a care cleaning tool. It showed that I have 1119,7 MB temporary storage. I tried to remove the temporary memory, but can not do the job. Internet is very slow. I checked the download speed and it was less than what it should be. I even hooked my laptop to incoming internet connection of m and it is the speed where it should be with that. I think that the problem comes from this temporary memory. any suggestions how I can remove it. I ran a full scan on securty essentials (48 hours) without help. Also the analysis complete the cleaning tool

    Thank you

    FOR INFO:

    When you run Disk Cleanup, it calculates how much space you could save on your HARD drive if you want to compress files "old."

    No one seems to have a good answer for what XP thinks is an old file... and with technology modern it isn't going to be a lot of improvement of your disk space and in fact, your system may operate more slowly, because it can need unzip these files when they are needed later.

    If you have 1 million files on the volume XP think will compress and run Disk Cleanup, it could take a long time to understand that and your system may appear to stop responding.

    Sometimes users interpret this as a problem with their system (and stop or restart), but Windows is just doing what you said to do.

    It can also can really be hung since MS also tells you how to stop this check for compression of files in an article in the knowledge base (perhaps they don't like it no more).

    If you have no interest to compress old files or it is just too long, you can have disk cleanup jump this calculation quite.

    You're going to be cleaning up your system in no time when this check for files that may need compression is removed.

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

  • How to remove the system idle from dashboard?

    Hi all!

    Anyone know how to remove the system idle from dashboard?

    It is possible at all?

    Thaks.

    No, you can't "remove them from the dashboard.

    You would turn them off (aka set them as inactive), and this would remove them from all reports.

    Best regards

    Jon Hemming

  • Remove the system image?

    I want to delete an image of my hard drive system. I found the following tips:

    Click on start-> Search: backup-> open "Backup and Restore"-> click on 'Manage space'-> Delete

    Unfortunately when I do that, there is no option 'manage space '. I use Windows 7...

    Any advice?

    You get this screen under one of the following conditions:

    • No replacement was ever conducted on this machine.
    • The backup of the image that you want to remove was created on another computer.
    • Someone has been removed and catalogs backup in the C:\System Volume Information folder.

    Now, you must manually remove the files from the image.

  • I try to remove the system disk error memory dump files clean up, usually around 350 MB but not cleaning cleaning!

    How can I get rid of these files? What do I do? seems to be a waste of space if I don't empty them.

    Hi russellinspain,

    Run the disk cleanup utility should delete these files. You can remove the files if you want to save space on the hard disk.

    Try to delete the files as an administrator. To do this, try the following steps.
    a. Click Start, type disk cleanup, click with the right button on disk cleanup and click Run as administrator.
    b. place a checkmark on "System error memory dump files"
    c. click ok and check if the files are deleted successfully.

    See Delete files using disk cleanup

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to remove the "another Memory" Macintosh HD?

    Hello

    So, I was see a gradual increase in the size of the 'other' memory of the Macintosh HD in the system that I use.

    A return of the week available space was 50 GB. Now, he has reduced to 30 GB.

    I use not all mobile devices to attach to this system.

    This system is used only for video editing.

    I only use Adobe software CC all and nothing else on this system.

    All my images, aftereffects, first pro files are stored on external hard drives.

    I wanted to know how can I reduce the size of this "another memory" Macintosh HD?

    Please advice.

    Post edited by: Khel now 2015

    'Others' consists of all not in the named categories, this will include contacts, calendars, OS X itself, all the documents that you did...

    In other words, look before you act.

  • How to 'Disable' or 'Close' or 'Remove' the system idle process?

    I saw this topic but, I don't see "how to remove, deactivate or close" that. PERMANENTLY!

    Please tell me, how? This process using my CPU % 70-99 every time. Please don't tell me ' scan your pc of spyware, malware, etc.. ". Yes, I did. And formatted and reinstalled windows 7 to 8 times. This problem was Goin ' we.

    I'll be crazy!

    Please help me with this?

    Wednesday, July 21, 2010, 14:02:19 + 0000, I have problems forever wrote:

    I saw this topic but, I don't see "how to remove, deactivate or close" that. PERMANENTLY!

    Please tell me, how? This process using my CPU % 70-99 every time. Please don't tell me ' scan your pc of spyware, malware, etc.. ". Yes, I did. And formatted and reinstalled windows 7 to 8 times. This problem was Goin ' we.

    I'll be crazy!

    Please help me with this?

    There is Nothing to "remove, disable or close. "System Idle.
    Process' is not at all no problem. 'Rest' means not "in use." It's
    just the name for the system when it does not
    whatever it is. It is there just to make the total adding up to 100%.

    If you see reading of 70 to 99%, so that means you actually use
    only 1% to 30%. This is quite normal. Nothing to worry about.

    Ken Blake

  • Win XP: Remove the 'System' of the 'My Documents' folder attribute

    Win XP: The 'My Documents' folder contains an attribute of the system. Now, I can't save file there. How can I remove the attribute "system"?

    If you look at the security for 'My Documents' tab, you will see that the system has access to the file, but it should not have attribute on the file system.

    Access special permissions and see who is the owner of the folder. It should be yourself. If this isn't the case, you may need to take ownership of the folder to get access.

    I hope this helps.

    Marilyn

  • Windows 7 - How to remove the 'system reserved' after installation

    I do not have a separate HDD called system reserved in my computer. It takes approximately 100 MB of space, but I never agreed to be installed separately.

    Can I format to get rid of him, or even delete or move somewhere? I do not have to reinstall Windows 7 to do this, because it takes time for all the programs to be reinstalled...

    Any suggestions of what could be done without having to reinstall Windows 7 new would be greatly appreciated. I would like to know if it's possible. Thank you.

    I would say that that keep the system reserved. It is a very convenient tool created by MS in case of emergency

    The following link will give you a better idea: http://social.technet.microsoft.com/Forums/en-US/w7itproinstall/thread/29fa0858-8971-413b-ba8a-d033aa6dae55

    You can delete system reserved partition, but if you happen to remove it, then you will not be able to use the bitlocker feature

    ;)

  • How to remove the system reserve of my computer?

    I installed Windows 7 Pro in Windows 7. I used a program of virtual drive to mount the iso of Windows 7. I then install Windows 7 pro. I started out in the 'new' Win 7 and let Windows do its thing updated and which do not. I have a Windows.old so I know that the operation went well. However, when I open the computer, he showed my C drive and an extra drive that I have 'E', but he also showed the system reserve partition drive. I know that this is part of the startup procedure so I know not, I can't delete it, but how do I remove it from my computer, where it shows all the readers of mjy? It wasn't until I reinstalled Windows (by that I mean the partition was there but does not in the window of the computer).

    To my knowledge, the partition of the reserve of should not be assigned a drive letter so do not appear in the window of the computer. My score is assigned to the letter G

    Hello

    Usually system reserved partition will not be assigned a drive letter. However, as you can see the score with a drive letter, I suggest you to refer to the article and remove the assigned drive letter:

    Change, add, or remove a drive letter

    http://Windows.Microsoft.com/en-in/Windows7/change-add-or-remove-a-drive-letter

    Once you remove the drive letter, it will not in the computer.

    It will be useful.

  • I get errors saying that the system memory is low.

    Hello. -A message that my system memory is low. -J' tried RESTORING the SYSTEM. but the warning is always present. -I am advised to close all OPEN PROGRAMS AND re - INSTALL. But I don't know how to do this. Could you please help. -Friendly - IAN RIPPINGHAM.

    original title: SYSTEM MEMORY IS LOW.

    Hello

    1 did you do changes on the computer before the show?

    2 - is the message full error ?

    See the site mentioned below for the procedure to uninstall a program:

    Uninstall or change a program

    http://windows.microsoft.com/en-us/windows7/Uninstall-or-change-a-program.

    Again, you can install programs by using the installation media supplied by the manufacturer or by downloading it from their site.

    I would say as you to see the site mentioned below:

    Prevention of problems of memory

    http://windows.microsoft.com/en-US/windows7/Preventing-low-memory-problems.

  • Remove the ' system VLAN "Nexus 1000V port-profile

    We have a Dell M1000e blade chassis with a number of Server Blade M605 ESXi 5.0 using the Nexus 1000V for networking.  We use 10 G Ethernet fabric B and C, for a total of 4 10 cards per server.  We do not use the NIC 1 G on A fabric.  We currently use a NIC of B and C fabrics for the traffic of the virtual machine and the other card NETWORK in each fabric for traffic management/vMotion/iSCSI VM.  We currently use iSCSI EqualLogic PS6010 arrays and have two configuration of port-groups with iSCSI connections (a physical NIC vmnic3 and a vmnic5 of NIC physical).

    We have added a unified EMC VNX 5300 table at our facility and we have configured three VLANs extra on our network - two for iSCSI and other for NFS configuration.  We've added added vEthernet port-profiles for the VLAN of new three, but when we added the new vmk # ports on some of the ESXi servers, they couldn't ping anything.   We got a deal of TAC with Cisco and it was determined that only a single port group with iSCSI connections can be bound to a physical uplink both.

    We decided that we would temporarily add the VLAN again to the list of VLANS allowed on the ports of trunk of physical switch currently only used for the traffic of the VM. We need to delete the new VLAN port ethernet-profile current but facing a problem.

    The Nexus 1000V current profile port that must be changed is:

    The DenverMgmtSanUplinks type ethernet port profile

    VMware-port group

    switchport mode trunk

    switchport trunk allowed vlan 2308-2306, 2311-2315

    passive auto channel-group mode

    no downtime

    System vlan 2308-2306, 2311-2315

    MGMT RISING SAN description

    enabled state

    We must remove the list ' system vlan "vlan 2313-2315 in order to remove them from the list" trunk switchport allowed vlan.

    However, when we try to do, we get an error about the port-profile is currently in use:

    vsm21a # conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    vsm21a (config) #-port ethernet type DenverMgmtSanUplinks profile

    vsm21a(config-port-Prof) # system vlan 2308-2306, 2311-2312

    ERROR: Cannot delete system VLAN, port-profile in use by Po2 interface

    We have 6 ESXi servers connected to this Nexus 1000V.  Originally they were MEC 3-8 but apparently when we made an update of the firmware, they had re - VEM 9-14 and the old 6 VEM and associates of the Channel ports, are orphans.

    By example, if we look at the port-channel 2 more in detail, we see orphans 3 VEM-related sound and it has no ports associated with it:

    Sho vsm21a(config-port-Prof) # run int port-channel 2

    ! Command: show running-config interface port-canal2

    ! Time: Thu Apr 26 18:59:06 2013

    version 4.2 (1) SV2 (1.1)

    interface port-canal2

    inherit port-profile DenverMgmtSanUplinks

    MEC 3

    vsm21a(config-port-Prof) # sho int port-channel 2

    port-canal2 is stopped (no operational member)

    Material: Port Channel, address: 0000.0000.0000 (bia 0000.0000.0000)

    MTU 1500 bytes, BW 100000 Kbit, DLY 10 usec,

    reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA

    Port mode is trunk

    Auto-duplex, 10 Gb/s

    Lighthouse is off

    Input stream control is turned off, output flow control is disabled

    Switchport monitor is off

    Members in this channel: Eth3/4, Eth3/6

    Final cleaning of "show interface" counters never

    102 interface resets

    We can probably remove the port-channel 2, but assumed that the error message on the port-profile in use is cascading on the other channel ports.  We can delete the other port-channel 4,6,8,10 orphans and 12 as they are associated with the orphan VEM, but we expect wil then also get errors on the channels of port 13,15,17,19,21 and 23 who are associated with the MEC assets.

    We are looking to see if there is an easy way to fix this on the MSM, or if we need to break one of the rising physical on each server, connect to a vSS or vDS and migrate all off us so the Nexus 1000V vmkernel ports can clean number VLAN.

    You will not be able to remove the VLAN from the system until nothing by using this port-profile. We are very protective of any vlan that is designated on the system command line vlan.

    You must clean the canals of old port and the old MEC. You can safely do 'no port-channel int' and "no vem" on devices which are no longer used.

    What you can do is to create a new port to link rising profile with the settings you want. Then invert the interfaces in the new port-profile. It is generally easier to create a new one then to attempt to clean and the old port-profile with control panel vlan.

    I would like to make the following steps.

    Create a new port-profile with the settings you want to

    Put the host in if possible maintenance mode

    Pick a network of former N1Kv eth port-profile card

    Add the network adapter in the new N1Kv eth port-profile

    Pull on the second NIC on the old port-profile of eth

    Add the second network card in the new port-profile

    You will get some duplicated packages, error messages, but it should work.

    The other option is to remove the N1Kv host and add it by using the new profile port eth.

    Another option is to leave it. Unless it's really bother you no VMs will be able to use these ports-profile unless you create a port veth profile on this VLAN.

    Louis

  • Removed the system restore points

    I tried to install Samsung Kies and Samsung mobile driver, once I did and had problems, then I tried to uninstall, I went to the restoration of the system and realized that all the points that have been created have been deleted. I have a lot of space on my computer and the system restore is enabled. Is there anyway that I can get back them? I ran a virus scan and all is well, but I'm just worried for where my points went.

    Thank you

    They are automatically deleted after they are no longer relevant, or if the space that you book for them runs.  You can drag the slider in your settings to reserve more space for their own good:

  • Removing the system tablespace

    Hey, I made a small mistake.

    I created a data file for the system tablespace in my local file system.

    Other data files is located in the box of asm.

    While starting the 2nd node, I get an error about the data file missing

    I use a 2 node rac with ASM - 11 GR 2 on SLES11

    How can I delete the newly created datafile systemtbs1.dbf?

    Christian wrote:
    Can you tell me the syntax to copy in the DATA Diskgroup

    I want to copy on in:
    + Dbsrv data file.

    Do I need to stop the PB?

    Identify number newly created datafile of v$ datafile . Consider that it is n , try the following

    rman target /
    backup as copy datafile n format '+DATA';
    switch datafile n to copy;
    recover datafile n;
    

    or

    rman target /
    copy datafile n  to '+DATA';
    switch datafile n to copy;
    recover datafile n;
    
  • Windows Update running long after the system restore Image

    This is my 2nd try at why put Windows runs so long.

    I did everything that was asked of me in my 1st post.

    My last answer a question for me was on 19 September 2016.

    Which was a Monday.
    Then silence.
    I don't know if anyone can help with this problem.

    It is still ongoing.

    But at least informed me that it is not something that can be done.

    Instead of silence.
    The links below are to my OneDrive.
    Please let me know if there is more information.

    Operating systems: Windows 7 Ultimate sp1 64-bit

    Recently I reinstalled Windows 7 with a system image backup.

    He took my computer the initial installation of Windows 7.

    When I checked for updates that need to be installed in the Windows Update control panel there are not.
    So I clicked Check For Updates.

    Rental search automatically updates, run first for 3 hours. Once again for 8 hours. Then once more for 20 hours.
    Each control time for updates still worked and no updates have been downloaded for installation.

    How can I get updates for my computer, if check for updates is not download any?

    Sheilah

    systemlog

    SystemInfo

    Try the solution:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-update/Windows-7-update-solution/f39a65fa-9d10-42E7-9bc0-7f5096b36d0c

Maybe you are looking for

  • Want nr 4-1117 does not start after the upgrade.

    New installation of Windows 8 and 8.1 update, everything's fine. During computer shutdown installs several windows updates to restart 8.1 Windows Startup Repair and then it fails to repair. What I was able to go back into safe mode, tried all the boo

  • Code 652 Windows Update encountered an unknown error

    I am trying to install a printer HP deskjet F4180 to a new computer. Computer Dell inspiron 1764, OS 64 bit, core i3, 4 GB Ram, 500 GB hard drive. Installation failed and the center of targeted solutions win7 and charge to do a windows update. The wi

  • Example of c# dot Net Module adapter

    Hi all I have been using screws for my adapter module almost exclusively, but want to branch out a bit and try a module adapter for c#. I understand exposes methods and properties in c#, but want to see and the example source code that could be used

  • where can I get a windows vista installation cd?

    My computer hangs regularly without reason and sometimes the screen goes all black.  I have Kaspersky on my computer, but I believe that there is some kind of virus on my computer.  Friends I talked to say that I have to reformat my computer.  By wha

  • whenever I re - start the computer I get this error: could not load the file nta0104.dll.

    "original title: NTA0104.dll. whenever I re - start the computer I get this error: could not load the file nta0104.dll. How can I fix? HM