How to use the Gif image in Blackberry android runtime

Hello

I deploy an android app in blackberry 10. All that it works well in blackberry 10 except gif image. In app android gif image is displayed using the AnimationDrawable from the link

http://developer.Android.com/reference/Android/graphics/drawable/AnimationDrawable.html

So how to use blackberry 10.

Is it possible to use GIFs in blackberry 10.

Please suggest.

Thanks in advance.

Hello

I found the solution.

He needs of the gifDecoder and gifDecoderView classes and following code extract

Mode, mode = inflate.inflate (R.layout.layout_gspot, null);
GIF GifDecoderView = view.findViewById (R.id.gifView) (GifDecoderView);
gif.setGifImageFromAssets ("abc.gif");

and following the layout code

<>
Android:ID="@+id/gifView".
Android: layout_width = "120dp."
Android: layout_height = "120dp."
Android:layout_alignLeft="@+id/textView1".
Android: layout_centerVertical = "true".
Android:background="@Android:color/transparent" / >

Tags: BlackBerry Developers

Similar Questions

  • How to use the gateway carrier on BlackBerry J2ME WAP?

    How to use the gateway carrier on BlackBerry J2ME WAP? Because the default gateway on BlackBerry is "blackberry.net". How to hard code in the application to force the application to use the WAP gateway? An example of code? Thank you!

    You can specify the specific settings of the WAP gateway within the Connector.open () method. There is a knowledge base of any developer this article here:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is_-_Different_ways_to_make_an_HTTP_or_socket_connection.html?nodeID=826935&vernum=0

  • How to change the bitmap image in blackberry

    Hello

    1. work on the version of BB storm (9500/9530 Simulator) is v4.7.0.75
    2 opportunity BB JDE 4.7
    3. the request is:

    I display a bitmap image by using the drawBitmap method. now I want to select a portion of the bitmap, and then I need to cut & paste the part somewhere in the screen (MSPaint we have option 'Select').

    is there any method that will make the similar operation (or) any idea to accomplish this in blackberry.

    Thank you

    Sendhil Kumar V

    Take a look at this thread and refers to the J2ME code:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=24929

    The 'trick' is getARGB() and setARGB().  As long as you check out relevant Bitmap Moose ARGB values, you should be able to create a new Bitmap.  That said, I never did.  Let us know how you go.

  • How to convert the Bitmap Image in BlackBerry

    Hello

    In my application, I get the picture from the server. Now, I want to convert this Bitmap Image to display on the screen. For this I use below codes. But it doesn't give me the same image does not mean with the clarity and the exact size. He's smaller than the picture.

    I used the codes below:

    private Bitmap getBitmapFromImg(Image img) {
            Bitmap bmp = null;
            try {
                Logger.out(TAG, "It is inside the the image conversion        " +img);
                Image image = Image.createImage(img);
                byte[] data = BMPGenerator.encodeBMP(image);
                Logger.out(TAG, "It is inside the the image conversion---333333333"+data);
                bmp = Bitmap.createBitmapFromBytes(data, 0, data.length, 1);
                } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return bmp;
            // TODO Auto-generated method stub
        }
    

    Here is the BMPGenerator class:

    public final class BMPGenerator {
    
            /**
             * @param image
             * @return
             * @throws IOException
             * @see {@link #encodeBMP(int[], int, int)}
             */
            public static byte[] encodeBMP(Image image) throws IOException {
                    int width = image.getWidth();
                    int height = image.getHeight();
                    int[] rgb = new int[height * width];
                    image.getRGB(rgb, 0, width, 0, 0, width, height);
                    return encodeBMP(rgb, width, height);
            }
    
            /**
             * A self-contained BMP generator, which takes a byte array (without any unusual
             * offsets) extracted from an {@link Image}. The target platform is J2ME. You may
             * wish to use the convenience method {@link #encodeBMP(Image)} instead of this.
             * 

    * A BMP file consists of 4 parts:- *

      *
    • header
    • *
    • information header
    • *
    • optional palette
    • *
    • image data
    • *
    * At this time only 24 bit uncompressed BMPs with Windows V3 headers can be created. * Future releases may become much more space-efficient, but will most likely be * ditched in favour of a PNG generator. * * @param rgb * @param width * @param height * @return * @throws IOException * @see http://en.wikipedia.org/wiki/Windows_bitmap */ public static byte[] encodeBMP(int[] rgb, int width, int height) throws IOException { int pad = (4 - (width % 4)) % 4; // the size of the BMP file in bytes int size = 14 + 40 + height * (pad + width * 3); ByteArrayOutputStream bytes = new ByteArrayOutputStream(size); DataOutputStream stream = new DataOutputStream(bytes); // HEADER // the magic number used to identify the BMP file: 0x42 0x4D stream.writeByte(0x42); stream.writeByte(0x4D); stream.writeInt(swapEndian(size)); // reserved stream.writeInt(0); // the offset, i.e. starting address of the bitmap data stream.writeInt(swapEndian(14 + 40)); // INFORMATION HEADER (Windows V3 header) // the size of this header (40 bytes) stream.writeInt(swapEndian(40)); // the bitmap width in pixels (signed integer). stream.writeInt(swapEndian(width)); // the bitmap height in pixels (signed integer). stream.writeInt(swapEndian(height)); // the number of colour planes being used. Must be set to 1. stream.writeShort(swapEndian((short) 1)); // the number of bits per pixel, which is the colour depth of the image. stream.writeShort(swapEndian((short) 24)); // the compression method being used. stream.writeInt(0); // image size. The size of the raw bitmap data. 0 is valid for uncompressed. stream.writeInt(0); // the horizontal resolution of the image. (pixel per meter, signed integer) stream.writeInt(0); // the vertical resolution of the image. (pixel per meter, signed integer) stream.writeInt(0); // the number of colours in the colour palette, or 0 to default to 2n. stream.writeInt(0); // the number of important colours used, or 0 when every colour is important; // generally ignored. stream.writeInt(0); // PALETTE // none for 24 bit depth // IMAGE DATA // starting in the bottom left, working right and then up // a series of 3 bytes per pixel in the order B G R. for (int j = height - 1; j >= 0; j--) { for (int i = 0; i < width; i++) { int val = rgb[i + width * j]; stream.writeByte(val & 0x000000FF); stream.writeByte((val >>> 8) & 0x000000FF); stream.writeByte((val >>> 16) & 0x000000FF); } // number of bytes in each row must be padded to multiple of 4 for (int i = 0; i < pad; i++) { stream.writeByte(0); } } byte[] out = bytes.toByteArray(); bytes.close(); // quick consistency check if (out.length != size) throw new RuntimeException("bad math"); return out; } /** * Swap the Endian-ness of a 32 bit integer. * * @param value * @return */ private static int swapEndian(int value) { int b1 = value & 0xff; int b2 = (value >> 8) & 0xff; int b3 = (value >> 16) & 0xff; int b4 = (value >> 24) & 0xff; return b1 << 24 | b2 << 16 | b3 << 8 | b4 << 0; } /** * Swap the Endian-ness of a 16 bit integer. * * @param value * @return */ private static short swapEndian(short value) { int b1 = value & 0xff; int b2 = (value >> 8) & 0xff; return (short) (b1 << 8 | b2 << 0); }

    Where an error in my code? Is there another way to do the same thing?

    Why you want to use a bmp image?
    You can just use png, jpg or whatever of the original image is.
    If there is a situation where you need the bitmap image call http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/EncodedImage.html#getBi...

  • How to use the project lib with blackberry projects.

    Hello Experts!

    I have a project that I use on many projects like setting but still I deploy my application on the device that I need to uninstall the other application that use it to install my new application, I doubt if I can generate a unique .cod with frame embebed...

    All of the suggestions.

    Best regards, Rampelotti

    I think I understand your problem, but can be interpreted wrong but here is my answer anyway.

    It is possible to create a library/framework .cod file and then use it in several projects without having to copy and duplicate code in other applications.

    Just put all the common code in a separate library/framework project and compile it.

    When its compiled, you will see not only a .cod file, but also a .jar file.

    Include the .jar file in your new project under the Build Path/Library files.

    After that, using the full qualified namespace, you can import the classes and use the library files in as many projects without code duplication in multiple applications.

    Note: You need to include the .cod with the project file and add the correct additional lines in the .jad file and .alx files during deployment.

    Let me know if you need more explanation on what it is.

    If this was the answer you were looking for then don't forget to tap on accept the solution, otherwise I may not understand what you said but would like to help futher.

  • How to use a gif image in a button in forms 6i

    Hi all

    I use forms 6i in windows xp platform. I want to display images in buttons gif. How can I accomplish this? Masters, please help...

    Thank you

    I thought that forms C/S required. ICO files...
    And you don't have to provide the extension in the name of icon file property.

    François

  • How to use the stock images adobe adobe muse?

    Trying to find the images that I have saved in a library of Stock and to use them in my Adobe Muse site.  Doesn't seem to work.  How to download a library on my hard drive?

    CC libraries are not yet supported in Muse. This says that you're not out of luck. You have a few options.

    1: go to the site of Stock and go to your history of license and the same link that you used to save the image to your library allows you to save to your desktop. Simply select desktop from the menu.

    2: Join the public beta of Muse to http://www.museprerelease.com

  • How do I move the gif image

    Hi all

    Can you give a brief description on the movement of the gif Image...

    I assume you mean a gif animated, in which case this is the article for you:

    http://supportforums.BlackBerry.com/T5/Java-development/display-an-animated-GIF/Ta-p/445014

    If this isn't what you meant, please can you us exactly what you are trying to reach?

  • How to use the image element displayed on the page

    APEX 4.0
    Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server

    Hi all

    I have a table that contains 3 columns, see below:
    primary key ID
    BLOB pic1
    Pic2 blog

    There is 1 row in it (id = 1), just to display 2 images.

    Downloaded 2 pictures above Blob fields by file browse function. Now, I want to show the 2 photos in a region by using the display image P1_AR, but it did not work.
    Based on: BLOB Columns specified in item source
    Alternative Text Column: null
    Filename Column: null
    BLOB last update Column: null
    Source used: Only when current value in session state is null
    Source type: SQL Query(return single value)
    Source value or express: select dbms_lob.getlength(PIC) from cp_pic where id=1
    I got the error below after runing:
    ORA-20999: P1_AR must have a valid BLOB column as a source

    Thank you

    your help with impatience

    Sorry, this demand is in LAN, I have no right to publish on the internet and it has no external IP address to access as well.

    Do not import your request directly to apex.oracle.com.

    Create a simple application to simulate your question.

  • Create a table that will have a similar table structure that you have.
  • Download images in table
  • Try to use item DISPLAY_IMAGE and see how it goes.

    If it doesn't, then please post workspace/name username/password and request of the details here.

    Kind regards
    Hari

  • How to use the variable in the path of the source of an image in flex

    Hello
    I just want to know that how to use the variable in the path of the source of an image in flex

    Hello
    I just want to know that how to use the variable in the path of the source of an image in flex

  • How to use the capture and the print button

    I tried to figure out how to use the capture and the "print" button, or add or what you call. I press it and the whole page of a different color changes, so I try to cut the section I want but I don't know how to send it to the printer. Can someone help me with this. I'm not at savvy with tech stuff, but when I find a recipe or something and it doesn't have an option to print a certain area, I can't understand how to use it?

    Thank you

    Andi Starbuck

    That happens to me is, I click and drag to make a rectangle of yellow selection, and as soon as I raise my finger on the mouse button, the part I've selected is captured as an image, a new tab opens and preview before printing, the image display. I can use the installation of the Page or simply print. But if I close the preview, this temporary image vanishes and I'm back on the page where I started. You see something different?

  • How to use the Qosmio F50 Quad core HD processor in other software

    I would like learn how to use the image processor in other programs in addition to Toshiba Upconvert, transcoding, face Navigation and gesture of the functionality of the control. Someone has an idea? Thank you!

    I doubt that there are software available because the Cell processor is only a hand full of PC.

    If you have applications for creation of media professionals, you can get the plug-in to activate the cell processing.

  • How to use the product with laptop Portege R150 recovery CD?

    How to use the recovery CD product with laptop Portege R150 of Formate and reinstall the operating system?

    Mobile recovery procedure Asian does not for me but may not be very different as on mobile phones produced in Europe or the United States.

    Start your laptop and press F12 to display the boot options
    Place the recovery disc into the optical disc drive
    In the start menu, choose the CD/DVD drive and press ENTER
    The procedure of the facilities is expected to begin
    Follow the menu on the screen

    I do not know what will be shown at this stage, but it is not complicated to install the original recovery image. If you have any other questions please let me know what happens when upgraders begins. What options are displayed?

  • How to use the greenscreen on Imovie 10.1 effect?

    I have no idea how to activate Advanced tools for this version of iMovie, there is nothing in the preferences, how I use the greenscreen / any other adnaced tool such as the image within an image etc.

    I'm on OS X YOSEMITE 10.10.5

    Hello!

    I have finally (!) has found a way to do it!

    You must drag and drop the element above the other, not ON it (like I usually did before). Then the invisible square symbol in the setting bar appears, which allows to choose between the van greenscreen etc.

  • Error code #0xe0f00013, using the factory image restore

    Hello world

    I've had this laptop for about 8 months. The model is HP PAVILION DV6T-4000 NOTEBOOK of NOTES,

    I'm a software developer, so I need to install Linux on this machine using dual boot.

    I created the recovery disks before installing linux.

    Once I installed linux, windows 7 has stopped working and started asking for the disc of windows 7. Using recovery discs, couldn't find an option to restore the old installation of windows 7 (these options are disabled). Other options of formatting HD and restore out-of-factory State were available. In the end, I had to select restore factory image.

    When I boot the recovery dvd and do a system restore it support all 5 discs and the 6th disc when it is 83% and is "copy files needed to restore the hard disk" it throws below error:

    "Recovery Manager is unable to restore your computer by using the original image.  Please contact HP support.  "Error code: 0xe0f00013.

    I tried to restore it 3 - 4 times, each time that the result would be the same.

    I ran HD self-test, which doesn't show any problem with my HD recovery, I created discs are cool and have no scratches. I'm not sure what the cause of this problem.

    All this raises questions under:

    (1) what is the hexadecimal code "0xe0f00013?"

    (2) once we buy a "personal" NOTEBOOK, should we not be free to install any operating according to our need?

    3) why HP does not provide with a Windows disc, and why should we depend on recovery disks, or the recovery partition; These unreliable mechanisms?

    Earlier, I had a Dell laptop that provided me with all the windows and recovery disks.

    I bought HP recovery discs. lets see if provided HP recovery disks.

    If anyone has any other work around, please help.

    Thank you.

    Hello

    There may be a work-around if you have (or can borrow) an installation disc Windows 7 at retail which is exactly the same version as your OEM installation - IE if your laptop comes with Windows 7 Home Premium 64-bit, it comes to the retail version accurate, you would need.

    If you do not access to the retail drives, you can create an installation disk yourself - just download good picture disc from the link below and use an app like ImgBurn to burn the ISO correctly on a blank DVD.

    http://www.mydigitallife.info/Download-Windows-7-ISO-official-32-bit-and-64-bit-direct-download-link...

    Use the disk to perform the installation, enter the Windows activation key located on the underside of your laptop when asked and once installation is complete, use the 'method of phone", described in detail in the link below to activate the operating system - this method supported by Microsoft and is popular with people who want to just have a new installation of Windows 7 without additional software load normally comes with OEM installations.

    http://www.kodyaz.com/articles/how-to-activate-Windows-7-by-phone.aspx

    Additional drivers, you may need to find from here.

    Kind regards

    DP - K

    

Maybe you are looking for

  • How can I get the icon to send

    There was once an icon send when writing email, but now I have to click on "file" and then click on 'Send now' or 'send later '. This seems to be an unnecessary step. How to get back the send icon?

  • I would like to improve my 320 GB hd at 1 to my Office M3100 aspilre what is the best HD t

    I ran out of space on my hard drive of 320 and want to upgrade to a 1 TB hard drive to restore speed in my aspire M3100 desktop. What is the best HD to get and how hard is it to transfer all the info on the new hard by car

  • Windows Media Player 11 - right click "Add/enqueue" option missing - cannot load the contents of the folder

    Hello Windows Media Player 11.0.6002.18005 for my Vista 64-bit system worked very well for me.  I could right click on any folder containing my Mp3 files and select 'Add to the reader' or 'enqueue' and it would then open and read my files that are in

  • Wireless Setup problems

    I have been using my p1102w with the usb connection, but due to the reorganization of the House I would like to configure the wireless. I went to start and programs and click Wireless Setup. When it asks me to choose my SSID, I select it. It gives me

  • PERMANENTLY block 10 windows *.

    How can I finalize the 10 Windows * installer on updates?  I removed 3 times and she also well hidden. Maybe I need to consult a lawyer because once you say telemarketers to arrest the appellant and they continue it's ILLEGAL!