Skip to content

Commit 63b19f0

Browse files
committed
fix(android): toBitmapAsync is not a function error fix
1 parent f70a9a9 commit 63b19f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/https/request.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class HttpsResponseLegacy implements IHttpsResponseLegacy {
159159
}
160160
return new Promise<ImageSource>((resolve, reject) => {
161161
this.getOrCreateCloseCallback();
162-
this.response.toBitmapAsync(this.getCallback(resolve, reject)).then((r) => {
162+
this.response.toImageAsync(this.getCallback(resolve, reject)).then((r) => {
163163
this.imageSource = r;
164164
return r;
165165
});

src/https/typings/android.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ declare namespace com {
1717
toByteArrayAsync(callback: OkHttpResponse.OkHttpResponseAsyncCallback);
1818
asString();
1919
asStringAsync(callback: OkHttpResponse.OkHttpResponseAsyncCallback);
20-
toBitmap();
21-
toBitmapAsync(callback: OkHttpResponse.OkHttpResponseAsyncCallback);
20+
toImage();
21+
toImageAsync(callback: OkHttpResponse.OkHttpResponseAsyncCallback);
2222
toFile();
2323
toFileAsync(filePath: string, callback: OkHttpResponse.OkHttpResponseAsyncCallback);
2424

0 commit comments

Comments
 (0)