Building Skytube for AAOS - problems with API Keys and crashes on startup #1348
Replies: 3 comments
-
You can use the same keys, or you can leave them out (The debug key is used when you build the app with the debug-flavor, the other key is used, when you build in release mode) |
Beta Was this translation helpful? Give feedback.
-
Got it thanks. Also, I noticed when I'm running the emulator in debug that there are a lot of StrictMode policy violations. I'm wondering if that is what is causing the crashes on startup. Any thoughts on that? |
Beta Was this translation helpful? Give feedback.
-
Well, good question. As I saw a couple of cases where the code run perfectly fine in emulator but crashed reportedly on real hardware, I cannot exclude. Even though most of the cases were due to missing classes or methods. But in the end, you need to see the logs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I'm trying to build a fork of Skytube for Android Automotive. While it builds and runs fine in the Automotive emulator on Android Studio, it has major issues when deployed as an internal test to the car itself. Basically, irrespective of whatever I try (permissions, etc) it starts and immediately crashes out. I'm not seeing anything come back yet to the console in "crashes and ANRs" to be able to debug it which makes it super difficult to work out what is going on. So I'm trying to hunt for why.
One of the areas of exploration is ensuring that the app itself is setup for what it needs. I noticed this in build.gradle:
// Third party devs: pls be ethical and change the below keys
buildConfigField 'String', 'YOUTUBE_API_KEYS_DEBUG', '""'
buildConfigField 'String[]', 'YOUTUBE_API_KEYS', '{}'
I'm trying to pass in keys in here.
// Third party devs: pls be ethical and change the below keys
buildConfigField 'String', 'YOUTUBE_API_KEYS_DEBUG', '"mykeygeneratedfromgoogleAPIconsole"'
buildConfigField 'String[]', 'YOUTUBE_API_KEYS', '{mykeygeneratedfromgoogleAPIconsole}'
Again, if I put nothing there it runs fine in the emulator - and I'm not quite sure how bc surely some kind of AuthN is required to the Youtube APIs.
Please someone help me understand what is happening here.
Beta Was this translation helpful? Give feedback.
All reactions