Autore Topic: fotocamera, gallery e http  (Letto 401 volte)

Offline DX89B

  • Utente junior
  • **
  • Post: 121
  • Respect: +1
    • Mostra profilo
  • Dispositivo Android:
    HTC Desire
  • Market Developer Name:
    Daniele Bonadiman
  • Sistema operativo:
    Mac OS X 10.6
Re:fotocamera, gallery e http
« Risposta #15 il: 07 Settembre 2010, 12:48:25 CEST »
0
questo è il log completo di cosa compie la galleria, ci capite qualcosa?


Codice: [Seleziona]
09-07 12:45:46.468: DEBUG/MainActivity(969): [HTCAlbum][MainActivity][onPause]: Begin
09-07 12:45:46.468: DEBUG/MainActivity(969): store mCurrentPosition_backup=0
09-07 12:45:46.468: DEBUG/DisplayManager(969): store mCurrentPosition_backup=0
09-07 12:45:46.528: DEBUG/dalvikvm(969): GC_EXPLICIT freed 576 objects / 27744 bytes in 40ms
09-07 12:45:46.528: DEBUG/ThumbnailWorker(969): [stopWorking] Stop working, now join #18, /mnt/sdcard/DCIM/100MEDIA/IMAG0018.jpg
09-07 12:45:46.528: DEBUG/AlbumAdapter(969): set thread priority to normal
09-07 12:45:46.528: DEBUG/AbstractViewGetter(969): Raise getter prefetcher thread priority to normal.
09-07 12:45:46.528: DEBUG/AbstractViewGetter(969): Join getter prefetch thread
09-07 12:45:46.528: DEBUG/AbstractViewGetter(969): Getter prefetch join time: 0
09-07 12:45:46.528: DEBUG/AlbumMapper(969): cancel current decode operation
09-07 12:45:46.538: INFO/BatteryStatsImpl(97): notePhoneSignalStrengthLocked: 2->3
09-07 12:45:46.668: DEBUG/CollectionsActivity(969): [HTCAlbum][CollectionsActivity][onDestroy]: Begin
09-07 12:45:46.668: DEBUG/AlbColAdap(969): [HTCAlbum][AlbumCollectionsAdapter][onDestroy]: Begin
09-07 12:45:46.668: DEBUG/AlbColAdap(969): [HTCAlbum][AlbumCollectionsAdapter][onDestroy]: End
09-07 12:45:46.868: DEBUG/MainActivity(969): [HTCAlbum][MainActivity][onStop]: Begin
09-07 12:45:46.928: DEBUG/dalvikvm(969): GC_EXPLICIT freed 489 objects / 22792 bytes in 64ms
09-07 12:45:46.928: DEBUG/MainActivity(969): [HTCAlbum][MainActivity][onDestroy]: Begin
09-07 12:45:46.938: DEBUG/OnlineDataCenter(969): [HTCAlbum][OnlineDataCenter][unbindContext]: Begin
09-07 12:45:46.948: DEBUG/OnlineDataCenter(969): [HTCAlbum][OnlineDataCenter][unbindContext]: com.htc.album.MainActivity@462b6e50context size: 0
09-07 12:45:46.948: DEBUG/OnlineDataCenter(969): [HTCAlbum][OnlineDataCenter][unbindContext]: No more clients. release resources.
09-07 12:45:46.948: DEBUG/OnlineDataCenter(969): [HTCAlbum][OnlineDataCenter][unbindContext]: End 0
09-07 12:45:46.948: DEBUG/ThumbnailWorker(969): [stopWorking] Stop working, now join #-1, Decode Complete!!
09-07 12:45:46.948: DEBUG/AlbumAdapter(969): set thread priority to normal
09-07 12:45:46.948: DEBUG/AlbumMapper(969): cancel current decode operation
09-07 12:45:46.948: DEBUG/AlbumMapper(969): cancel current decode operation
09-07 12:45:46.948: DEBUG/ThumbnailWorker(969): [stopWorking] Stop working, now join #-1, Decode Complete!!
09-07 12:45:46.948: DEBUG/AlbumAdapter(969): set thread priority to normal
09-07 12:45:46.948: DEBUG/AlbumAdapter(969): Join worker thread in destroy
09-07 12:45:46.948: DEBUG/AlbumAdapter(969): Join time: 0
09-07 12:45:46.948: INFO/MainActivity(969): mWorker finishes jobs at onDestroy().
« Ultima modifica: 07 Settembre 2010, 14:20:29 CEST da JD »

Offline DX89B

  • Utente junior
  • **
  • Post: 121
  • Respect: +1
    • Mostra profilo
  • Dispositivo Android:
    HTC Desire
  • Market Developer Name:
    Daniele Bonadiman
  • Sistema operativo:
    Mac OS X 10.6
Re:fotocamera, gallery e http
« Risposta #16 il: 10 Settembre 2010, 10:23:37 CEST »
0
Allora questo è il mio albero delle attività, 

A (TabActivity)
|
|__ B (Activity Group)
|   |
|   |__C (ListActivity)
|   |__ D(ListActivity)
|   |__GALLERY FOR RESULT

Da quello ho capito cercando in giro per google la onActivityResult non viene chiamata quando usata all'interno di un ActivityGroup, dev esserci una soluzione ma non riesco a vederla,trovarla -.-

Offline DX89B

  • Utente junior
  • **
  • Post: 121
  • Respect: +1
    • Mostra profilo
  • Dispositivo Android:
    HTC Desire
  • Market Developer Name:
    Daniele Bonadiman
  • Sistema operativo:
    Mac OS X 10.6
Re:fotocamera, gallery e http
« Risposta #17 il: 10 Settembre 2010, 13:05:15 CEST »
0
era un problema di "gerarchia " delle activity,

cmq ora il problema è un altro,
ho
Codice (Java): [Seleziona]
selectedImage = data.getData();
                                 
                                   
                                    Log.i("postclient", selectedImage.toString());
                                    Post invia = new Post();
                                    invia.execute();

come va utilizzata l'uri selectedImage per poter ottenere l'indirizzo effettivo come stringa per poterlo aprire con File file = new File(selectedImage)

ho letto che si usano i ContentResolver, ma non ho capito come li devo chiamare in questo contesto, sapete come aiutarmi, grazie

Offline Ricky`

  • Moderatore globale
  • Utente storico
  • *****
  • Post: 2698
  • Respect: +370
    • Google+
    • rciovati
    • Mostra profilo
  • Dispositivo Android:
    Galaxy Nexus
  • Sistema operativo:
    OS X Lion
Re:fotocamera, gallery e http
« Risposta #18 il: 10 Settembre 2010, 18:56:22 CEST »
0
Codice (Java): [Seleziona]
File f = new File( new URI( uri.toString() ) );
Ti consiglio di googlare per bene :)

Offline DX89B

  • Utente junior
  • **
  • Post: 121
  • Respect: +1
    • Mostra profilo
  • Dispositivo Android:
    HTC Desire
  • Market Developer Name:
    Daniele Bonadiman
  • Sistema operativo:
    Mac OS X 10.6
Re:fotocamera, gallery e http
« Risposta #19 il: 11 Settembre 2010, 08:59:57 CEST »
0
così le immagini non le aprono , ho dovuto usare un cursor cmq adesso questa parte va :)

Offline Ricky`

  • Moderatore globale
  • Utente storico
  • *****
  • Post: 2698
  • Respect: +370
    • Google+
    • rciovati
    • Mostra profilo
  • Dispositivo Android:
    Galaxy Nexus
  • Sistema operativo:
    OS X Lion
Re:fotocamera, gallery e http
« Risposta #20 il: 11 Settembre 2010, 20:35:57 CEST »
0
così le immagini non le aprono , ho dovuto usare un cursor cmq adesso questa parte va :)

Come no... io nella mia app uso questo codice e funziona correttamente.