This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.
Any way to get dpi in kony? Requirement is to get the image folder name(@2x,@3x or xhdpi, xxhdpi ) etc.
You can use doLayout() to get the frame details which will give you height, width in dpi. Call the doLayout on any widget in the form preshow, syntax is
form.widget.doLayout=callback;
function callback()
{
kony.print(this.view);
}
Based on the device width only you can get the exact resolution to find out from which folder the image has picked up. Where in case of iOS, based on the model you can put the condition. If it is iPhone 5, 6, 7, 8 will pick up @2x and iPhone 6+, 7+ 8+ will pickup @3x.