M
M
Morn2014-12-05 23:20:57
Android
Morn, 2014-12-05 23:20:57

How to disable MainActivity?

There are two Activities in the application:
1) the main one, where parameters for some lengthy operation are set;
2) the second, where the status of this operation is shown.
It is necessary that after the start of the operation and until its completion it was impossible to get into the MainActivity either by the Back button or by restarting the application (the application shortcut should immediately open the second Activity if the application is still running in the background).
Of course, if there is an easier way to do the same, I would be interested in it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2014-12-06
@Morn

let it open the first one and check before the interface is drawn, whether the action is performed or not, if it is performed, then immediately go to the next activity, and override onbackpressed in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question