Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kitten smoothie
Dec 29, 2001

FAT32 SHAMER posted:

I was looking at AnyChart but i get
so I assume those are from old API levels or something

What's your compile/target SDK version? AnyChart is built against 28 so it shouldn't be referencing old stuff.

Adbot
ADBOT LOVES YOU

kitten smoothie
Dec 29, 2001

I wanna say there was a typo exactly like this in Android Studio’s starter template for build.gradle if I remember right.

kitten smoothie
Dec 29, 2001

baka kaba posted:

it's a good tool to learn at some point anyways

100%. This tool will save you so much time. And once you get to the bottom of the leak it's usually always something that'll make you feel really stupid, like a listener causing a referential loop, or something like that.

kitten smoothie
Dec 29, 2001

Yeah, follow the directions in the docs to make a release signed version but don't post it to the store. You can just pass the .apk file to your friend and they can enable "install apps from unknown sources" on their phone and install it.

kitten smoothie
Dec 29, 2001

https://developer.android.com/guide/navigation/navigation-deep-link#implicit

Have you already looked at this? I haven't tried this but it looks like you can set URI matchers on a specific state in the navigation graph, and the toolchain will auto-generate the intent filters for the container activity accordingly.

kitten smoothie
Dec 29, 2001

ringu0 posted:

Unfortunately neither of these solutions is in the cards. The web services are self-hosted by the customers, so there's no single URL to package. There is a first-run state and the UI to type in the URL, but the deployment team requested a config file for mass deployment. It's an enterprise app, and we provide hardware with preinstalled software.

Last time I worked on such an enterprise app, we provided the clients with the apk and instructions for the client to use apktool to re-pack it with their configuration and customization. We instructed them to sign it and distribute it themselves using their MDM.

kitten smoothie
Dec 29, 2001

I work on an app with multiple packs purchasable via IAP.

We control it by having a backend service that validates the IAP receipt, and another backend endpoint that dishes out the actual content if you’ve authenticated it.

The app does the IAP, the receipt from Play Billing is sent to the backend. Backend calls Google’s validation endpoint to confirm it’s a legit receipt.

Upon confirming the receipt is good, the service gives you back a token you can use to get the content by calling the second service.

Our content is pretty small. If it were bigger I would probably suggest making a service that will trade an IAP receipt for a signed AWS S3 download link with a reasonable expiry date.

Same thing then happens when you restore purchases, we call Play Billing to get all your receipts, send the lot of them to that endpoint, and get back the content.

kitten smoothie fucked around with this message at 17:46 on Jan 26, 2021

kitten smoothie
Dec 29, 2001

brand engager posted:

What causes android 10 to automatically grant the camera permission? I have some test app that only declares uses-permission for android.permission.camera, and when I install it the camera permission is already granted. Everything I've found in the documentation says the camera permission can only be granted by asking at runtime.

Edit: it's loving gradle doing it somehow. Doesn't happen if I install manually with adb, but using the installDebug task automatically grants the camera permission.


What version of the Gradle plugin are you using, looks like this may have been fixed in 4.2. The idea was to auto grant permissions for instrumented tests but it just granted whatever was in the manifest all the time

https://issuetracker.google.com/issues/172112073

Adbot
ADBOT LOVES YOU

kitten smoothie
Dec 29, 2001

Glimm posted:

Of course, you could encrypt the key before sending it, but then you've got to store the decryption key in the client...

It's a tough problem
Modern Android devices have hardware backed keystore, essentially anything with a fingerprint reader is mandated by Android CDD to have a means of storing keys in hardware.

Another thing you can do is use key attestation (this is different than Safetynet attestation), this works on devices that shipped with 7.0 and later.

If you create a public/private keypair you get metadata in the public key certificate that gives you some important data: the application ID of the app that created the key, and the SHA256 of the app signature, so you can verify the key was created by your app. It also indicates whether the private key is in hardware and not accessible to the Android side of the house. Finally you can plant a piece of user metadata into the keypair when you create it, like a timestamp value to prevent replay attacks. That whole shebang is signed by a key burned into the hardware, which is then chained back to a Google root certificate, so you can verify that the key was actually generated on device in the hardware encryption environment, and not replaying from a previous user.

So if you're okay with online access once at first load, you could create a keypair on-device, send a backend of yours the public key. That looks at attestation data, if it's good, encrypts your data blob with the public key and sends it down. At that point then you've got an encrypted data blob that can only be decrypted by that one phone because the private key to decrypt it is in hardware.

This might help you with storing the data encrypted at rest (and at least only require online access at first load) but you're still going to have to decrypt it to use it at runtime.

kitten smoothie fucked around with this message at 20:00 on May 15, 2021

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply