开发者

Android app crash with fortumo in-app payments

The app code is

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.view.View.OnClickListener;

public class app extends PaymentActivity {
 @Override
   public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

           setContentView(R.layout.main);

           makePayment();



           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?btnI&q=zippyshare" +q.getText().toString()));
                 startActivity(i);

                   }
           });

   }

 @Override
 protected void onPaymentCanceled(String arg0) {
  // TODO Auto-generated method stub

 }

 @Override
 protected void onPaymentFailed(String arg0) {
  // TODO Auto-generated method stub

 }

 @Override
 protected void onPaymentPending(long arg0, String arg1) {
  // TODO Auto-generated method stub

 }

 @Override
 protected void onPaymentSuccess(String arg0) {
  // TODO Auto-generated method stub

 }  
}

and the xml file is

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.musicdownloader"
  android:versionCode="1"
  android:versionName="1.0" android:installLocation="auto">
  <supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:resizeable="true"
    android:anyDensity="true"
    />
    <application android:icon="@drawable/icon" android:label="@string/app_name">




<activity android:name=".app">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


  <activity android:theme="@android:style/Theme.Translucent.NoTitleBar" android:name="com.fortumo.android.FortumoActivity" android:taskAffinity="com.fortumo.android.FortumoActivity"/>
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permi开发者_StackOverflow社区ssion android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.READ_SMS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />   
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />   
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
  <uses-permission android:name="android.permission.READ_OWNER_DATA" />
  <uses-permission android:name="android.permission.WRITE_OWNER_DATA" />
  <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.READ_CONTACTS" />

</application>

</manifest>

I want somebody to help me with fortumo in app payment. Why does the app crash??


Suggest to call makepayment in onclick of button. this triggers the sms payment cycle.

EDIT

Suggest that you add PaymentActivity in your manifest along with fortumoactivity ie., both activities need to be declared.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜