Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Compare Bitmaps



I am trying to compare 2 screenshots of phone using locateDifference(), these screenshots can contain changes I am uninterested in like network activity indicator or battery charging indicator,  these changes in screenshots are triggering more than needed data (the changes) to be sent over the network.


I have tried to overcome this problem by setting my XYRect which I pass to locateDifference() to new XYRect(0, 50, widthOfScreen, heightOfScreen - 50) which is 50 pixels down hopefully bypassing the network indicator, it doesnt work, I still get notified of changes in the area of network indicator - ie y = 2.


I have tried to change the offsetY argument to 50 in locateDifference but it just throws illegalargumentexception. I have tried manually setting the values of the XYRect instead of when initialising it but it didn't help - the XYRect always outputs 50 as it's y value though.


Is this a bug or am I missing something? I am using 7.0.


Thank you for reading.