Scopo
Restituisce una stringa che identifica univocamente una foto nel rullino del dispositivo. Questa funzione viene normalmente utilizzata insieme alle funzioni GetPhotoDateTime, GetPhotoThumbnail e GetPhoto per navigare nel rullino del dispositivo.
Sintassi
string ID = "" // Identificativo della foto nell'album
//
ID = Shell.getPhotoID(IDAlbum, index)
//
ID = Shell.getPhotoID(IDAlbum, index)
Argomenti
IDAlbum | È un parametro di tipo stringa e rappresenta il nome dell'album che contiene la foto di cui si desidera ottenere l'identificativo. Tale valore viene normalmente ottenuto chiamando la funzione GetAlbumID. |
index | È un parametro di tipo intero e rappresenta l'indice della foto all'interno dell'album di cui occorre leggere l'identificativo. Deve essere compreso tra 0 e il risultato della funzione GetPhotoCount. |
Valore di ritorno
Viene restituito un valore di tipo stringa il cui valore rappresenta un identificativo univoco per la foto. È possibile fornire il valore restituito dalla funzione alle funzioni GetPhotoDateTime, GetPhotoThumbnail e GetPhoto. Se l'applicazione viene eseguita fuori dalla shell nativa, la funzione restituisce il valore Null.
Esempio di codice
public void Rullino.ElencaFoto()
{
for (int alb = 0; alb < Shell.getAlbumCount(); alb = alb + 1)
{
string albumName = Shell.getAlbumID(alb)
for (int f = 0; f < Shell.getPhotoCount(albumName); f = f + 1)
{
string pictureID = Shell.getPhotoID(albumName, f)
string thumbPath = Shell.getPhotoThumbnail(albumName, pictureID, ...)
date time pictureDT = Shell.getPhotoDateTime(albumName, pictureID)
}
}
}
{
for (int alb = 0; alb < Shell.getAlbumCount(); alb = alb + 1)
{
string albumName = Shell.getAlbumID(alb)
for (int f = 0; f < Shell.getPhotoCount(albumName); f = f + 1)
{
string pictureID = Shell.getPhotoID(albumName, f)
string thumbPath = Shell.getPhotoThumbnail(albumName, pictureID, ...)
date time pictureDT = Shell.getPhotoDateTime(albumName, pictureID)
}
}
}
- La funzione può essere utilizzata unicamente in un'applicazione offline avviata dentro alla shell nativa. Se viene eseguita in una applicazione non offline (C#/Java) o in un'applicazione web offline fuori dalla shell nativa, il sistema genera un'eccezione.
Ultima modifica: 25/10/2016 / Validità: da 12.0.5200