- Home /
Fail to operate Soomla/Unity and do not understand the error
Hey all,
I'm integrating the Soomla store to my Unity game but it wouldn't work.
My problem is : when i run it on my android device and i press the butons for pay with google play, nothing is happening, there is no errors and no message. And when I debug it whit unity, there is no error message. If needed I can provide some logs.
I explain my steps below :
First I drag the CoreEvents and the StoreEvents on my splash screen scene. Then I made three files, the IStoreAssets, another for the initialisation and a script who call functions for buy items.
Next, I setup Soomla settings in Unity, google integrated products and plublished my app in closed alpha.
Implementation of the IStoreAssets :
public int GetVersion() {
return 0;
}
public VirtualCurrency[] GetCurrencies() {
return new VirtualCurrency[]{};
}
public VirtualGood[] GetGoods() {
return new VirtualGood[] {UFO_SKIN_LTVG, SUPERHERO_SKIN_LTVG, SPACESHIP_SKIN_LTVG, NO_ADS_LTVG};
}
public VirtualCurrencyPack[] GetCurrencyPacks() {
return new VirtualCurrencyPack[] {};
}
public VirtualCategory[] GetCategories() {
return new VirtualCategory[]{};
}
/** Static Final Members **/
public static VirtualGood UFO_SKIN_LTVG = new LifetimeVG(
"Ufo skin", // name
"Ufo skin desc", // description
"ufo_skin", // item id
new PurchaseWithMarket(new MarketItem("ufo_skin", 1.00)));
public static VirtualGood SUPERHERO_SKIN_LTVG = new LifetimeVG(
"Super Hero skin",
"Super Hero skin desc",
"superhero_skin",
new PurchaseWithMarket(new MarketItem("superhero_skin", 1.00)));
public static VirtualGood SPACESHIP_SKIN_LTVG = new LifetimeVG(
"Spaceship skin",
"Spaceship skin desc",
"spaceship_skin",
new PurchaseWithMarket(new MarketItem("spaceship_skin", 1.00)));
public static VirtualGood NO_ADS_LTVG = new LifetimeVG(
"No Ads",
"No More Ads!",
"no_ads",
new PurchaseWithMarket(new MarketItem("no_ads", 1.00)));
The initialisation ( I made it on splashscreen launching) :
void Start () {
SoomlaStore.Initialize (new StoreAssets());
}
The function script (I use it on 4 differents butons on another scene) :
public void RemoveAddsPressed () {
StoreInventory.BuyItem ("no_ads");
}
public void BuyUfoSkinPressed () {
StoreInventory.BuyItem ("ufo_skin");
}
public void BuySuperHeroSkinPressed () {
StoreInventory.BuyItem ("superhero_skin");
}
public void BuySpaceShipSkinPressed () {
StoreInventory.BuyItem ("spaceship_skin");
}
I've tested with the soomla higway to. Like this :
void Start () {
SoomlaHighway.Initialize();
SoomlaStore.Initialize (new StoreAssets());
}
But this code make the game crash on splashscreen.
Can someone help me to see if I made a mistake on the code or in another part of the integration ?
Here is a link to my first post on the soomla aswer page : http://answers.soom.la/t/fail-to-operate-soomla-and-do-not-understand-the-error/3208?u=d_lopes
Thank's
Answer by DaniDan23 · Aug 18, 2015 at 04:08 AM
I think I've found the problem in logs :
E/SOOMLA SoomlaStore(11747): ERROR: SoomlaStore failure: You don't have a billing service attached.
Decide which billing service you want, add it to AndroidManifest.xml and add its jar to the path.
E/Unity (11747): SOOMLA SoomlaStore Couldn't load billing service! Billing functions won't work.
E/Unity (11747): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65)
I/Unity (11747): AndroidJavaException: java.lang.ClassNotFoundException:
com.soomla.store.billing.google.GooglePlayIabService
But I don't know how to resolve it. There is my AndroidManifest.xml file (Assets/Plugins/Android/AndroidManifest.xml) :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:versionCode="1" android:versionName="1.0">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true" android:name="com.soomla.SoomlaApp">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
<activity android:name="com.soomla.store.billing.google.GooglePlayIabService$IabActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<meta-data android:name="billing.service" android:value="google.GooglePlayIabService" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>
I think the manifest is good and when i upload my application on the google play console it's well written that the app contains the permission : com.android.vending.BILLING.
Anyone have an idea ? Thanks
Answer by gurdotan · Aug 18, 2015 at 03:06 PM
Have you tried posting this question on the SOOMLA forum? http://answers.soom.la/
Yes I put the link in my first post.
There it is : http://answers.soom.la/t/fail-to-operate-soomla-and-do-not-understand-the-error/3208
Your answer
Follow this Question
Related Questions
in app purchase sooma restore option 1 Answer
I know not how to implement the "open IAB" in unity 0 Answers
Unity 5.3 In-App Purchase Error 0 Answers
Permissions added to Android Manifest, but Google Play not registering the change? 0 Answers
Android application (Unity 5) closes without error a few seconds into game on random devices. 0 Answers