Hi,
We made a game and now we would like to upload it to google store. Unfortunately my app has 80mb so I need extension file.
I’ve just created my .obb file. So what’s next? Should I change something in androidmanifest etc? I’m doing it for the first time, so I would be grateful for instructions. I know that I have to change the path in AppDelegate to my obb file. But how to do it?
Hi,
thanks for replay, but probably you have invalid adres under ‘this’ because I cant see anything. I read a lot, but still cant find answers on some questions.
My extension file can be .obb or .zip?
2.Have I do something else with my .obb/.zip file or just point FileUtilis path to this file?
3.Whats path should I put inside FileUtils::getInstance()->setSearchPath(WHAT_PUT_HERE) ?
If you have some experience could you help me please?
When I upload my apk to google dev console to test if everything work, and then I change something in code, have I upload my apk and wait few hours to test it again?
Ok, thank you.
Probably I understand how to change the path, but did you change something in AndroidManifest or in java files? I dont know java so it would be problem for me…
You have to add these lines to download the expansion file
<!--
In order to start the service, it must be uniquely registered with
the package manager here.
-->
<service android:name=".SampleDownloaderService" />
<!--
In order for the alarm manager to contact the downloader script, the receiver
must be uniquely registered with the package manager here.
-->
<receiver android:name=".SampleAlarmReceiver" />
and for unzipping the expansion file
<!-- this activity check if the expansion file is available, then unzip it -->
<activity android:configChanges="orientation"
android:label="@string/app_name"
android:name="com.example.example.MainActivity" android:screenOrientation="sensorLandscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Don’t forget to change android:screenOrientation="sensorLandscape"
How did you unzip the file?
And if my game is in Portrait orientation should I use android:screenOrientation="sensorPortriat" instead of android:screenOrientation="sensorLandscape"?
And how can I get storage directory?
In android docs I’ve read that we use getExternalStorageDirectory(). But how can I achieve it with cocos2dx?
Could anyone send me AppDelegate.cpp file with unzipping and loading resources from .zip or .obb file(expansion file), I completely dont know how to do it using cocos2dx… ;(