"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
As a possible case you may get an illegal exception if your Bitmap is too big to create a BitmapField instance. What dimensions (width x heigh) has your Bitmap? In my experience starting from ~1.5 Mpx it becomes impossible to create BitmapField (an exact limit depends on device model/OS level).
As a possible case you may get an illegal exception if your Bitmap is too big to create a BitmapField instance. What dimensions (width x heigh) has your Bitmap? In my experience starting from ~1.5 Mpx it becomes impossible to create BitmapField (an exact limit depends on device model/OS level).
UPDATE: OK, then to figure out what is going on could you try the following approach? Private void updateUI() { UiApplication. GetUiApplication().
InvokeLater(new Runnable() { public void run() { if (googleImage == null) { Dialog. Alert("googleImage is null"); } else { Dialog. Alert("googleImage is not null"); try { BitmapField be = new BitmapField(googleImage); Dialog.
Alert("BitmapField has been created OK"); activeScreen. Add(b); Dialog. Alert("BitmapField has been added OK"); // no need to invalidate, since adding a new Field forces // the screen to be repainted } catch (Exception e) { Dialog.
Alert("Got error: " + e); } } } }); } What messages do you see? If you get "BitmapField has been added OK" then just remove all alerts (just leave the only in the catch section - just in case) and it should work Ok.
The exception is not due to the image size or any memory constraints. It is while adding the field to the UI, from network thread. – Neel Sep 17 at 11:00 @Neel: see UPDATE section – Arhimed Sep 17 at 14:17 Arhimed.. thanks a lot.
Its working now. – Neel Sep 18 at 5:53.
A few things... 1) Since Download is an inner class, you don't need the reference to activeScreen So, change your updateUI method to the following: private void updateUI() { synchronized (Application.getEventLock()) { if(googleImage! = null ) { add(new BitmapField(googleImage)); //invalidate(); } } 2) FieldChangeListener is not working for me. If you instantiate with something like new ButtonField("blah", ButtonField.
CONSUME_CLICK) it may work. However, I'm listening for the click with the following: ButtonField btn = new ButtonField("Download") { protected boolean navigationClick(int arg0, int arg1) { new Download().start(); return true; } }; 3) What type of images are you downloading? To handle JPGs, PNGs, etc.You need something like this to process the byte array instead of the static method on the Bitmap class: EncodedImage img = EncodedImage.
CreateEncodedImage(dataArray, 0, dataArray. Length); googleImage = img.getBitmap(); 4) In the simulator, if you're not using MDS, you need to suffix URLs with ;deviceside=true Works for me.No exceptions. Running on OS 5 9550 simulator.
You are capturing the event lock and performing the download (locking the entire app until completed. You need to use a thread to perform your download off of the UI thread (without capturing the event lock) and call your update UI After the thread completes its task.
I have taken a inner class which extends thread and then I called the run method from my fieldChanged(). Here the problem is remains same. I hope it is downloading the image but still I have the issue for updating in ui.
– Neel Sep 14 at 6:37 Can you post a stack trace? – Dan Sep 14 at 21:21.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.