Blackberry Emulator under Windows to test website
Date : March 29 2020, 07:55 AM
|
BlackBerry Contacts Photo
Tag : java , By : Ernie Thomason
Date : March 29 2020, 07:55 AM
wish helps you If you want to store your images in the database instead of just a path to reference the image, the column that will hold your image need to be of BLOB type. CREATE TABLE upload (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
content LONGBLOB NOT NULL,
PRIMARY KEY(id)
);
//First param is a Bitmap, second is quality
JPEGEncodedImage encodedImage = JPEGEncodedImage.encode(image, 100);
byte imageBytes[]=encodedImage.getData();
//The HTTP connection stuff
HttpConnection conn = (HttpConnection) Connector.open(SERVER_URL, Connector.READ_WRITE);
conn.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE, HttpProtocolConstants.CONTENT_TYPE_MULTIPART_FORM_DATA);
conn.setRequestMethod(HttpConnection.POST);
conn.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(imageBytes.length));
//Change this part to what your server side code expects
String contDisp="Content-Disposition:form-data; uploadedimage=YOUR_IMAGE_NAME;filename=\"Image.jpg\"";
String contEnc = "Content-Transfer-Encoding: binary";
String type="Content-Type:image/jpeg";
OutputStream out= conn.openOutputStream();
out.write(imageBytes);
out.flush();
out.close();
|
Test a mobile website for Android or BlackBerry
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Testing mobile websites The best way to to test mobile websites is to install an emulator for the phone you want to test on.
|
Is it necessary to sign every blackberry application even if i have to just test it on blackberry real device?
Date : March 29 2020, 07:55 AM
Does that help If you are using signed API in your code, then you need to sign your application, before installing it on an actual device. Unsigned app that uses signed API will work only on simulator, but won't work on an actual device. Apply for signing keys here: http://www.blackberry.com/go/codesigning
|
Send photo to email bot, upload photo to website
Date : March 29 2020, 07:55 AM
|