Aviary SDK update in Android
Asked Answered
Q

4

9

So we've been using Aviary SDK in our project for a long time, and no problems occured. But when we updated the Aviary version to latest, some strange behavior was revealed - when u first install application with new version of Aviary bundled on a device, which has version of app with older Aviary version, app crashes with exception -

FATAL EXCEPTION: IntentService[AviaryCdsService]
java.lang.IllegalStateException: Missing required api key secret

second run of installed app work as expected, and all functions are working properly. If device doesn't have previously installed app, no crash occured and installation runs fine. This behavior revealed when migrating from com.aviary.android.feather.sdk:aviary-sdk:3.4.3.351 to com.aviary.android.feather.sdk:aviary-sdk:3.6.3

Does anyone else had such problem, and is there any way to avoid this crash?

Quadriplegia answered 16/12, 2014 at 13:33 Comment(1)
If anyone get the same problem, our team figured out workaround for this - we add these lines of code in onCreate() method of our Application class: Intent cdsIntent = AviaryIntent.createCdsInitIntent(getBaseContext(), API_SECRET, null); startService( cdsIntent );Quadriplegia
S
2

Create application class and put below code in onCreate() methide

Intent cdsIntent = AviaryIntent.createCdsInitIntent(getBaseContext(), API_SECRET, null); startService( cdsIntent );

Sextant answered 3/11, 2016 at 6:20 Comment(0)
A
0

I was experiencing the same exception, but it may have been because I was calling AviaryIntent.createCdsInitIntent inside an activity. Once I moved the call to AviaryIntent.createCdsInitIntent to the Application this exception went away.

Artificial answered 21/12, 2014 at 7:37 Comment(0)
D
0

The answer is in the documentation.

4.1. Assets Folder Create a folder called "aviary" inside the assets folder of your application. Inside, create a file called "aviary.txt" - on the first line of this file put your API-secret and on the second line put your Google Play billing public API key. This file is not entirely necessary but you will receive a warning if you exclude it. We do this to optimize content downloads when your app is not active. Check the assets folder of the sample application for a template on how to do this.

Dramamine answered 20/4, 2015 at 3:51 Comment(2)
Please add a proper attribution link and clear quote formatting.Willson
this is not perfect solutionPhycomycete
F
0

What if you don't have a Google Play billing public API key for the app?

Forman answered 16/5, 2015 at 14:32 Comment(1)
You should be able to just pass an empty string instead of the Google Play billing key. That's how it works in the Creative SDK Image Editor.Derekderelict

© 2022 - 2024 — McMap. All rights reserved.