0

I am using fortumo solution for payment, in an android application 2.1 (I tried also with android 3.0).

I followed the user guid by creating the payment in the manifest.xml permission and enabling it in the onCreat. This line of code (in the onCreat) is returning an error.

Thank you for your help!

manifest:

<permission
    android:name="com.example.speedsinglefinder.PAYMENT_BROADCAST_PERMISSION"
    android:label="Read payment status"
    android:protectionLevel="signature" />

onCreate:

MpUtils.enablePaymentBroadcast(this,
            Manifest.permission.PAYMENT_BROADCAST_PERMISSION);
Avijit
  • 3,834
  • 4
  • 33
  • 45
ahmed_khan_89
  • 2,755
  • 26
  • 49

1 Answers1

0

I found the solution. You should enable the permission in the main processes (directly under onCreat not in a thread).

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_err);
            MpUtils.enablePaymentBroadcast(this,
                    Manifest.permission.PAYMENT_BROADCAST_PERMISSION);
ahmed_khan_89
  • 2,755
  • 26
  • 49