Bug? Content Chooser

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Hi,

I´m using content chooser to allow a user select a photo from gallery. Many times when selecting photo my application resumes without directory and filename filled (return from CC event).
Reading some threads I notice that this problem was already reported. In my tests I could see that the touch timing make diference in getting the data filled in directory and filename back suggesting that this problem could being generated by some interation between the persistence of data passed by gallery in intent buffer during the periodo after choosing (only a feeling)...
The question is: in many applications - and in my application either - allow user select images from gallery and use this image in app is VERY important (many times this is one of the first steps in the user experience with you application!).
Could you debug Content Chooser and fix it ? - asap please
By the way, I tested in a LG P-920 (in emulator the bug doesn´t occurs but I think, reading the posts, that this isn´t only in P-920 also...)
 

Marcos Alves

Well-Known Member
Licensed User
Longtime User
I tested and detected some interesting things:

- When CC is called the control (start/stop/pause) of B4A ide is lost
- The log continues...
- Activity is paused and start again after selection with isfirst = true (wrong...)
- When succeed, the event is generated... when fail, the activity is resumed but without data

During experiences I could fell some interaction between the timing of touch (slow/fast) and event capture success... maybe I´m wrong, but I think no.

That´s it.

Thanks

Ps: sorry the delay answering - I was out of my office yesterday... the solution of this issue is #VERY# important for us - like I told this is the "entry point" of our clients in our apps (profile photo).


LogCat connected to: B4A-Bridge: LGE LG-P920-357854040145426
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service

** Service (httputils2service) Create ** '###### activity start
** Service (httputils2service) Start **
** Activity (cadastro) Pause, UserClosed = false ** '###### CC called and gallery open
** Activity (cadastro1) Create, isFirst = true ** '####### Gallery selection/activity return
** Activity (cadastro1) Resume **
** Activity (cadastro1) Pause, UserClosed = false ** '### Many times without event...
** Activity (cadastro1) Create, isFirst = true **
** Activity (cadastro1) Resume **
** Activity (cadastro1) Pause, UserClosed = false **
** Activity (cadastro1) Create, isFirst = true **
** Activity (cadastro1) Resume **
** Activity (cadastro1) Pause, UserClosed = false **
** Activity (cadastro1) Create, isFirst = true **
** Activity (cadastro1) Resume **
** Activity (cadastro1) Pause, UserClosed = false ** '### TRY AGAIN... AGAIN... SUCCESS
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
CC_result -> true Dir -> ContentDir Filename -> content://media/external/images/media/103293
** Activity (cadastro1) Resume **
** Activity (cadastro1) Pause, UserClosed = false **
 

Marcos Alves

Well-Known Member
Licensed User
Longtime User
@Erel I already used an application with a service/startforeground, but this generates an notify icon and I notice that many users doesn´t like the notify icon always on the screen (I had many uninstalls because this icon!) - then my question: is it possible to have a StartForeground service in my app without a notification icon always on the screen? (by the way, That worked! The OS was killing the proccess... I started to working in programming since 80´s and Android remember me the old 80´s PC´s... but with more ram memory :) )
 
Last edited:

Marcos Alves

Well-Known Member
Licensed User
Longtime User
Hi @Erel ,

and... is there any way to maintain a persistent service in background without a notification icon???
 
Last edited:

Marcos Alves

Well-Known Member
Licensed User
Longtime User
No. You can create a transparent icon. However you only need to call Service.StartForeground before using ContentChooser and then you can call Service.StopForeground. The user will most likely not notice it.

Hi Erel,

I did not confirm yet but I notice that if you do not set an icon in notify (do NOT notify.ico = whatever...) and do no set information (notify.setinfo), when using this notifier in startforeground there is no notification icon... maybe I´m wrong but this worked in that way in one of my app´s... I´ll check again and publish if confirmed or not.
 
Last edited:

Marcos Alves

Well-Known Member
Licensed User
Longtime User
No. You can create a transparent icon. However you only need to call Service.StartForeground before using ContentChooser and then you can call Service.StopForeground. The user will most likely not notice it.

By the way: worked! CC always return the photo. Thanks!!!
 
Top