1

Topic: a parent method

Kind time of days.
Children, the help is necessary yours. We admit the following code is had:

public void name1 () {
Log.d ("log", "Start name1");
name2 (5);
Log.d ("log", "the end name1");
}
public void name2 (int aa) {
Log.d ("log", "Start name2");
...
Log.d ("log", "the end name2");
}

I.e. from a method name1 it is launched name2. Also it turns out while name2 does not fulfill up to the end, name1 it will not be closed.

Start name1
Start name2
The end name2
The end name1

And me it is necessary from method name1 to launch name2 and at once to close name1

Start name1
The end name1
Start name2
The end name2

Or

Start name1
Start name2
The end name1
The end name2

Prompt as so it is possible to make. Whether it is possible somehow from name2 to close name1, or to launch name2 and at once to close name1, for the present it was not fulfilled name2?

2

Re: a parent method

It is necessary to fulfill a method name2 in a background thread, but how you asked a question, to you such still early to be engaged

3

Re: a parent method

chpasha wrote:

it is necessary to fulfill a method name2 in a background thread, but how you asked a question, to you such still early to be engaged

Severely smile))

zhenika wrote:

Prompt as so it is possible to make. Whether it is possible somehow from name2 to close name1, or to launch name2 and at once to close name1, for the present it was not fulfilled name2?

http://startandroid.ru/ru/component/sea … Itemid=103 start to read from below upwards about a multithreading and services.