3
Hello!
In my application, I have a Button
, that when clicked, opens the device’s camera so the user can take a photo:
@Override
public void onClick(View v) {
//dialog da minha aplicação
final ProgressDialog dialog = MobileUtils.getBasicProgressDialog(getBaseContext());
// Cria uma intent para capturar uma imagem e retorna o controle para quem o chamou
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
...
}
The application should show a Dialog
before going to the camera, but it stops for about 5 seconds, opens the camera, and the dialog is only shown on the way back.
There is a way to only open the camera after the Dialog
turn up?
The only chance I see is for the camera to be called by/on Dialog.
– ramaral
I’ll study how to do it, post the answer when I get it!
– Morfina
Maybe if you change your approach and analyze the context, it’s the best option. The user clicked on a photo take button and you want to show an alert before it opens the camera. Doesn’t it make more sense to display the dialog with a "I got it" button and, by clicking this button, open the camera? Or still, it would not be better to extract this information to another part of the layout, which does not require a dialog?
– rsicarelli
In fact the dialog just displays a "wait", and it would only be to guide the user that the camera will open
– Morfina