1
내 블랙 베리 애플리케이션에 모든 화면의 하단에 광고 이미지가 있습니다 (배너 이미지).URL의 이미지 인코딩이 작동하지 않습니다.
시뮬레이터 응용 프로그램에서 잘 작동하지만 Strom 2 (9550) 응용 프로그램을 설치할 때 배너 이미지없이 잘 작동합니다.
내 웹 서비스에서 배너 이미지 URL을 모두 가져 오지만 화면의 URL 표시에서 이미지 인코딩을 시도 할 때 url에서 이미지를 인코딩 할 수 없어 앱이 잘 보이지 않습니다.
사전에 인코딩 이미지를
connection = (HttpConnection) Connector.open(bannerImage[i], Connector.READ, true);
inputStream = connection.openInputStream();
byte[] responseData = new byte[10000];
int length = 0;
StringBuffer rawResponse = new StringBuffer();
while (-1 != (length = inputStream.read(responseData)))
{
rawResponse.append(new String(responseData, 0, length));
}
int responseCode = connection.getResponseCode();
if (responseCode != HttpConnection.HTTP_OK)
{
throw new IOException("HTTP response code: "
+ responseCode);
}
final String result = rawResponse.toString();
byte[] dataArray = result.getBytes();
encodeImageBitmap = EncodedImage.createEncodedImage(dataArray, 0, dataArray.length);
감사를 내 아래 코드를 볼!
그래서 정확히 무엇이 문제입니까? 예외가 있습니까? 그렇다면 무엇이며 언제 발생합니까? 좀 더 자세한 정보가 필요해. –
나는 wifi를 통해 인터넷을 사용하고 있기 때문에 이것이 문제라고 생각한다.이 코드의 끝 부분에 매개 변수를 추가하면 좋다. – Hitarth