S
S
sitev_ru2015-07-06 13:48:31
Android
sitev_ru, 2015-07-06 13:48:31

Can I open my application on top of the rest?

I need an event, for example, a timer to open the application on top of the rest. They suggested the following code:

Intent intent = new Intent(context, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);

But it doesn't work. I am not familiar with such intricacies of android, what is the best and easiest way to do it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question