Вот часть моего кода:
public class Result extends Fragment{
BigInteger sumCipher = BigInteger.ZERO;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.result, container, false);
return rootView;
}
@Override
public void onStart() {
super.onStart();
new AsyncGetSumCipher().execute();
}
public void setSumCipher(BigInteger sum){
this.sumCipher = sum;
}
public BigInteger getSumCipher(){
return sumCipher;
}
}
Класс AsyncGetSumCipher, очевидно, содержит doInBackground и onPostExecute. Последнее выглядит следующим образом:
protected void onPostExecute(StringBuilder result) {
super.onPostExecute(result);
BigInteger bi = new BigInteger(result.toString());
setSumCipher(bi);
}
Кто-нибудь может мне помочь? Я застрял на этом уже несколько недель :(