nativescript-telegram-image-picker
Version:
NativeScript plugin using the TelegramGallery Image Picker library for a customized image picker.
49 lines (33 loc) • 1.57 kB
Markdown
[](https://www.npmjs.com/package/nativescript-telegram-image-picker)
[](https://www.npmjs.com/package/nativescript-telegram-image-picker)
NativeScript plugin using the [TelegramGallery Image Picker library](https://github.com/TangXiaoLv/TelegramGallery) for a customized image picker for Android.
** ANDROID ONLY ** - this plugin uses a native Android library so there is no direct equivalent for iOS.

This plugin is licensed under the MITlicense by Brad Martin
```
tns plugin add nativescript-telegram-image-picker
```
```typescript
import { openTelegramImagePicker, TelegramPickerResponse } from 'nativescript-telegram-image-picker';
public whateverYouLike() {
// Open the Telegram Gallery Image Picker Activity
openTelegramImagePicker(5).then((resp: TelegramPickerResponse) => {
// looping over the selected pictures in the response
for (var i = 0; i < resp.photos.length; i++) {
console.log(resp.photos[i]);
}
})
}
```
- openTelegramImagePicker(photoLimit?: number): Promise *TelegramPickerResponse*;
**TelegramPickerResponse** -
{
photos: Array<string>,
videos: Array<string>
}