Я хочу позвонить makePayment();
Я хочу автоматически запустить ...... Это мой код
package com.musicdownloader;
import com.fortumo.android.PaymentActivity;
import com.musicdownloader.R;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import android.view.View.OnClickListener;
public class app extends PaymentActivity {
public void onCreate(Bundle savedInstanceState) {
makePayment();
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button payButton = (Button) findViewById(R.id.Next);
payButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
final EditText q = (EditText) findViewById(R.id.q);
Intent i = new Intent("android.intent.action.VIEW", Uri.parse("http://www.google.com/search?q=" +q.getText().toString()));
startActivity(i);
}
});
}
@Override
protected void onPaymentCanceled(String product) {
Toast.makeText(this, "Payment canceled by user", Toast.LENGTH_SHORT).show();
}
@Override
protected void onPaymentFailed(String product) {
Toast.makeText(this, "Payment failed", Toast.LENGTH_SHORT).show();
}
@Override
protected void onPaymentPending(long messageId, String product) {
Toast.makeText(this, "Payment not confirmed", Toast.LENGTH_SHORT).show();
}
@Override
protected void onPaymentSuccess(String product) {
Toast.makeText(this, "Payment received", Toast.LENGTH_SHORT).show();
}
Как это назвать ??Спасибо