I am using blackberry maps to write my Application and want to show current location of the user on the map using a Blue dot image. I am able to do it by overriding the paint() method of the MapField and place the image at the right place.
However now I want to pulsate(breathing bubble) the image, for that I am using a gif image with 3 different frames. Here i am not sure how to display all the 3 frames at certain frame rate so that I don't have to rely upon mapfield.paint() to draw my images. Initially I thought of using AnimatedGifField's thread for this, but not sure how to using it coz i can't add a field(AnimatedGifField) to a field(MapField). I am using JDE 6.0
Does anyone has any idea about it..?
I would probably just keep using the paint() method, but when you need to redraw the bubble, invalidate a region instead of invalidating the entire screen. This will allow you to continue using the paint method without needing to have the entire thing redraw itself.
Related
I downloaded the latest iOS package from vidyo.io and have successfully built my application integrated with the Vidyo libraries and using the VidyoConnector API.
When my app first comes up, I was very happy to see that a preview video appears on the screen just where I’d expect it to be! However, when moving the view to a different location, the video did not render quite how I intended.
The video did move to the x/y position on screen that I’d hoped but the size did not adjust to my new view dimensions. Then I found the VidyoConnectorShowViewAt API call and that did indeed resize my view but the positioning of the video then was off.
Is this the correct call to make when moving and resizing a view? Does anybody have any ideas what I could be doing wrong? Any help would be appreciated.
Sounds like you are pretty close. If you are just moving your view to different coordinates without resizing, then no API call is necessary. But if also resizing, then indeed use VidyoConnectorShowViewAt. My hunch is that your coordinates that you are passing are off, as x and y should be relative to the view itself and not to the main view. So try passing 0 and 0 as x and y and see if that helps.
I would like to know when the screen is being drawn on iOS. In particular, I'd like to know if there are any visible changes being drawn on screen. This can be handy to know how long a page took to render, for example (assuming that the user is not interacting with the page). I would like to be able to capture this information in a regular production build, not in a developer build. And I'd like this to be a general solution applicable to most any page in my app, not just a specific page.
For example, I have a page that 1) asynchronously queries an API for data, 2) displays that data in a UITableView where some of the entries may be offscreen, and then 3) asynchronously downloads the images for each of the visible items on the screen. I want to get callbacks when the UITableView is rendered and when all of the images are rendered. The total time to render the page can be determined by looking at the timestamp of the last call to the callback (again, assuming no user interaction).
On Android, this is fairly simple. You can use ViewTreeObserver.addPreDrawListener to get a callback whenever the screen is being drawn. If there's no visible change to the screen, the callback is not called.
On iOS, it looks like CADisplayLink might potentially serve a similar purpose. However, when I hook up my CADisplayLink, it appears to be called over-and-over forever, whether or not there are visible changes on the screen.
Is there a way to know when there are visible changes to the screen being drawn in iOS?
In iOS 9 Apple made it impossible to get access to things drawn onto the screen outside of your app. Prior, it was possible to use an API called IOSurface to do it, but Apple closed it down in iOS 9. (To prevent apps from snooping on each other.)
So if you're talking about ANYTHING being drawn to the screen the answer is no. If you're looking for changes within your app there's probably a way to do it.
How does it superimpose elements (the timer is above the map) ?
To my understanding, you can only use background images on groups, no other kind of custom views...
Any idea ?
My initial guess is that they're using a dynamically-generated image of a map as the background image in the group. The giveaway is that, while WKInterfaceMap allows you to add custom annotations, you can't draw custom shapes like the blue route line.
I could be way off.
The way Uber (and most of the big companies custom's UI) is done is that they're just generating an image in the iOS which is the sent back to the WatchKit extensions and simply displayed as an image.
If you want to create your custom UI with hte current version of the SDK, this is the only way to achieve exactly what you want. You will need some hacks to achieve interactivity but you should be able to do that on your own :)
am creating custom live tiles by updating the text in a 173x173 XAML control, then using writablebitmap.Render to create a JPEG. Finally, create StandardTileData, set the two images, and put them on the correct tile. Works most of the time. Actually it always updates fine. But once in a while when a new tile is created, or deleted, the image is corrupted. The text is all mushed on the left side of the tile and there is no background color.
Any ideas what could be happening? It's not a background task as that is disabled. Something to do with the system scanning the newly created jpegs while I'm trying to set the tile data?
thanks.
found solution here
rendering usercontrol live tile windows phone
Obviously a system bug.
calling UpdateLayout before and after each measure and arrange call
I want to add blackberry ads on my GameCanvas. But we can only show the Blackberry ads on Blackberry MainScreen. Is there any way to show the ads on GameCanvas?
If Banner class is not final (I don't have API docs) I think you can try in this way:
Create banner field object and resize it for your particular frame
Create RIM graphics with corresponded size Bitmap
Every Canvas repaint call paint of Banner field (it's protected so you need to extend Banner)
Draw Bitmap pixel on your canvas particular frame
It's just idea. There could be other hidden required calls like simulate adding field to screen, call setVisible, etc. And I'm 90% sure that Banner is final.
So it's 90% impossible I think :)