Java Code Examples for org.telegram.messenger.MediaController#loadGalleryPhotosAlbums()

The following examples show how to use org.telegram.messenger.MediaController#loadGalleryPhotosAlbums() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChatAttachAlert.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
private void onRevealAnimationEnd(boolean open) {
    NotificationCenter.getInstance(currentAccount).setAnimationInProgress(false);
    revealAnimationInProgress = false;
    MediaController.AlbumEntry albumEntry;
    if (baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (open && Build.VERSION.SDK_INT <= 19 && albumEntry == null) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
    if (open) {
        checkCamera(true);
        showHint();
    }
}
 
Example 2
Source File: ChatAttachAlert.java    From TelePlus-Android with GNU General Public License v2.0 6 votes vote down vote up
private void onRevealAnimationEnd(boolean open) {
    NotificationCenter.getInstance(currentAccount).setAnimationInProgress(false);
    revealAnimationInProgress = false;
    MediaController.AlbumEntry albumEntry;
    if (baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (open && Build.VERSION.SDK_INT <= 19 && albumEntry == null) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
    if (open) {
        checkCamera(true);
        showHint();
    }
}
 
Example 3
Source File: PhotoAlbumPickerActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean onFragmentCreate()
{
    loading = true;
    MediaController.loadGalleryPhotosAlbums(classGuid);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.albumsDidLoaded);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.recentImagesDidLoaded);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.closeChats);
    return super.onFragmentCreate();
}
 
Example 4
Source File: ChatAttachAlert.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public void loadGalleryPhotos() {
    MediaController.AlbumEntry albumEntry;
    if (baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (albumEntry == null && Build.VERSION.SDK_INT >= 21) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
}
 
Example 5
Source File: PhotoAlbumPickerActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean onFragmentCreate()
{
    loading = true;
    MediaController.loadGalleryPhotosAlbums(classGuid);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.albumsDidLoaded);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.recentImagesDidLoaded);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.closeChats);
    return super.onFragmentCreate();
}
 
Example 6
Source File: ChatAttachAlert.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public void loadGalleryPhotos() {
    MediaController.AlbumEntry albumEntry;
    if (baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (albumEntry == null && Build.VERSION.SDK_INT >= 21) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
}
 
Example 7
Source File: PhotoAlbumPickerActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean onFragmentCreate() {
    if (selectPhotoType != 0 || !allowSearchImages) {
        albumsSorted = MediaController.allPhotoAlbums;
    } else {
        albumsSorted = MediaController.allMediaAlbums;
    }
    loading = albumsSorted == null;
    MediaController.loadGalleryPhotosAlbums(classGuid);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.albumsDidLoad);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.closeChats);
    return super.onFragmentCreate();
}
 
Example 8
Source File: ChatAttachAlert.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onOpenAnimationEnd() {
    MediaController.AlbumEntry albumEntry;
    if (baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (Build.VERSION.SDK_INT <= 19 && albumEntry == null) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
    currentAttachLayout.onOpenAnimationEnd();
    AndroidUtilities.makeAccessibilityAnnouncement(LocaleController.getString("AccDescrAttachButton", R.string.AccDescrAttachButton));
}
 
Example 9
Source File: ChatAttachAlertPhotoLayout.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public void loadGalleryPhotos() {
    MediaController.AlbumEntry albumEntry;
    if (parentAlert.baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (albumEntry == null && Build.VERSION.SDK_INT >= 21) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
}
 
Example 10
Source File: PhotoAlbumPickerActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean onFragmentCreate() {
    if (selectPhotoType != 0 || !allowSearchImages) {
        albumsSorted = MediaController.allPhotoAlbums;
    } else {
        albumsSorted = MediaController.allMediaAlbums;
    }
    loading = albumsSorted == null;
    MediaController.loadGalleryPhotosAlbums(classGuid);
    NotificationCenter.getGlobalInstance().addObserver(this, NotificationCenter.albumsDidLoad);
    NotificationCenter.getInstance(currentAccount).addObserver(this, NotificationCenter.closeChats);
    return super.onFragmentCreate();
}
 
Example 11
Source File: ChatAttachAlert.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onOpenAnimationEnd() {
    MediaController.AlbumEntry albumEntry;
    if (baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (Build.VERSION.SDK_INT <= 19 && albumEntry == null) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
    currentAttachLayout.onOpenAnimationEnd();
    AndroidUtilities.makeAccessibilityAnnouncement(LocaleController.getString("AccDescrAttachButton", R.string.AccDescrAttachButton));
}
 
Example 12
Source File: ChatAttachAlertPhotoLayout.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public void loadGalleryPhotos() {
    MediaController.AlbumEntry albumEntry;
    if (parentAlert.baseFragment instanceof ChatActivity) {
        albumEntry = MediaController.allMediaAlbumEntry;
    } else {
        albumEntry = MediaController.allPhotosAlbumEntry;
    }
    if (albumEntry == null && Build.VERSION.SDK_INT >= 21) {
        MediaController.loadGalleryPhotosAlbums(0);
    }
}