user3527580
user3527580

Reputation: 33

Widget Fallback is disabled while in sandbox mode (Fortumo)

I am using fortumo for Android. In AVD fortumo is working fine with the application, but when I debug it on my mobile device. It give me

"Widget Fallback is disabled while in sandbox mode"

I searched about it and found that it is occurring because there is no SIM card in mobile.

So my query is that how can I run fortumo in sandbox mode exactly as I am running it on my AVD(Android Virtual device). It should run same on my mobile device as it is running on AVD

Thanks

Upvotes: 3

Views: 766

Answers (3)

MJM
MJM

Reputation: 5311

In my case, I have an issue with Permission before request a payment flow you have to ask for runtime permission for READ_PHONE_STATE and RECEIVE_SMS/SEND_SMS reference from Ask for permission.

After requesting a runtime permission, it's working fine

Upvotes: 0

Ritesh Gune
Ritesh Gune

Reputation: 16739

Fortumo is an international mobile payment provider and it provides mobile operator billing service. First understand how Fortumo works.

  1. Fortumo sdk is integrated into the app.
  2. User purchases digital goods from the developer by confirming the payment with their mobile phone and charging the amount to their phone bill.
  3. Fortumo checks its list of 300 operators to see where to send the payment request and forwards it to the correct operator.
  4. The operator checks if the user has enough money to make a mobile payment and sends information back to Fortumo.
  5. When everything is OK, Fortumo completes the transaction and lets the developer know to transfer digital goods to the user. At the end of the month, all payments are transferred to the developer.

Hence in order to test Fortumo in-app purchase you need to have a SIM card inserted into the device on which you want to test.The SIM card acts as center point in connection between user, operator and Fortumo. Also sometimes SMS are also exchanged between user and operator while making Fortumo payment.

In AVD fortumo is working fine with the application.

The android emulator(AVD) provides various emulation like telephony emulation, SMS emulation and many more. So when you run the application on AVD the android emulates the sim card providing the SMS emulation as well . Hence you don't get the "Widget Fallback is disabled while in sandbox mode" toast on AVD.

how can I run fortumo in sandbox mode exactly as I am running it on my AVD(Android Virtual device).

Just insert a SIM card in your device and run the code. It will work fine.

UPDATE :

Using Fortumo on devices without a SIM card.

When using Fortumo on tablets without a SIM card,widget-fallback will happen. A website is loaded where you are asked to enter your phone number, then you receive instructions to send a keyword to a certain number. After sending this message, users have to wait a few seconds until their payment was accepted, then the website will stop loading/waiting, return to your app, and the MESSAGE_STATUS_BILLED broadcast is sent.

Supporting Tablets

<!-- If your app doesn't need to make phone calls, you can add this, so the app
could be installed on tablets. -->
<uses-feature android:name="android.hardware.telephony" android:required="false" />

Reference

UPDATE 2:

If sim card is not inserted web-window is shown for payments.However it works only in live mode. For some countries only web-window payments are supported. It works only in live mode, too.

Upvotes: 4

akarimova
akarimova

Reputation: 200

"Widget Fallback is disabled while in sandbox mode"
Fallback are supported only in live mode. And fallbacks are active if
1. country supports only fallbacks
2. sim card is not inserted

In other cases all works fine.

Upvotes: 4

Related Questions