Reputation: 348
Here is my code. I'm not able to create image from this vector object.
Hashtable metaData = new Hashtable();
Vector Ad = IADView.getBannerAdData(LwuitAd.this, "MyCompany_MyApp", metaData);
Object retImg = null;
if (null != Ad) {
retImg = Ad.elementAt(0);
}
if (retImg != null) {
com.sun.lwuit.Image img = com.sun.lwuit.Image.createImage(Ad.elementAt(0));// it shows error in this line
Button buttonAd = new Button();
buttonAd.setIcon(img);
f.addComponent(BorderLayout.NORTH, buttonAd);
f.show();
} else {
System.out.println("retImg is null");
}
Upvotes: 1
Views: 81
Reputation: 58
Use the classes to extract the image from IADView of Inneractive
You can also have a look at its implementation on the Nokia Weather Project
Cheers
Upvotes: 2