|
Sereri posted:Has anyone here ever come across this: I do it like this, it was done several years ago so I no longer remember why but it's been tested on hundreds of devices: code:
code:
|
# ¿ Apr 20, 2016 11:04 |
|
|
# ¿ May 10, 2024 17:56 |
|
Kotlin is good, and the java/android sdk interoperability is really seamless. Feels like a better version of Swift
|
# ¿ Oct 8, 2016 03:15 |
|
how about skipping java and using clock_gettime() with CLOCK_MONOTONIC? linux is one of the easier platforms to get monotonic time with
|
# ¿ Oct 21, 2016 04:06 |
|
Taffer posted:I started using kotlin and it is amazing. You should all use kotlin.
|
# ¿ Mar 18, 2017 18:45 |
|
VostokProgram posted:Is there anywhere I can find documentation about Android's libc implementation? I've gathered that it's called bionic and found its git repository, but an actual searchable manual like glibc has would be pretty nice... What do you need it for? It's not like you can develop against it or do you work for a device vendor?
|
# ¿ Mar 21, 2017 21:11 |
|
Volmarias posted:You're aware of the NDK, yes? NDK uses its own libc, I recall in a recent blog post they told developers not to rely on any system libraries to prevent conflicts. For OEM it's different of course, I'd just look at the source. It's mostly POSIX anyway with some platform-irrelevant stuff missing.
|
# ¿ Mar 22, 2017 01:22 |
|
Scaramouche posted:Based on some Googling, an XBF is apparently a binary of a XAML file, which I obviously don't have since I'm not the developer of the app. Is there a way for me to generate these XBF files in Chinese? binary XML can always be decompiled back into plaintext, your first step would be to look for a xaml decompiler to see what the files look like
|
# ¿ Mar 23, 2017 22:02 |
|
FAT32 SHAMER posted:I'm trying to verify that my app is receiving UDP traffic from port 12001 to rule out the app being broken and see if the device sending the UDP signals (a vehicle) is actually sending them. What's the best way to do this? there seems to be a lot of sniffers on the play store but they seem to require connection to a VPN and they seem to be dodgy. these are two separate problems, you can test UDP receiving by sending data with for example netcat if you're in the same network pre:$ echo asd|nc -u <phone-ip> 12001 https://developer.android.com/training/monitoring-device-state/doze-standby.html also UDP seems like an awful idea in 2017, but maybe you don't have a choice?
|
# ¿ Jul 11, 2017 19:30 |
|
Hughlander posted:For a mobile device where the time the radio is on is directly correlated to battery life, why is UDP bad? I’ve personally had to do a lot of work around batching up network traffic to give double digit battery gains and if I could have used UDP for it, I would have in a heart beat. UDP handles firewalls/NAT very inconsistently, and if you want to do anything serious with it you'll probably re-invent the TCP wheel badly. With TCP you already have full control over how often you send the connection keepalive packets (if you control the server that is) so there shouldn't be any battery saving either. UDP is great for: * If your bandwidth is so tiny you can't handle the ~40 bytes in response packets * If your data is literally garbage and can afford to throw it into a black hole without ever knowing what happens to it * DNS Vesi fucked around with this message at 21:31 on Jul 11, 2017 |
# ¿ Jul 11, 2017 21:28 |
|
make sure a "Save" button is actually necessary too, it's a bit of an old paradigm
|
# ¿ Dec 22, 2017 23:27 |
|
The sunflower sample app is a good starting point for new apps I think, it has all the latest things being used as they're supposed to https://github.com/googlesamples/android-sunflower
|
# ¿ Aug 20, 2018 05:22 |
|
baka kaba posted:
You have an unnecessary assignation there, you can just Java code:
|
# ¿ Aug 21, 2018 09:46 |
|
FAT32 SHAMER posted:YES AND ITS DRIVING ME loving CRAZY WHEN WORKING WITH LINEAR LAYOUTS I don't know if this is related but I use Code->Reformat Code a lot and I noticed it was rearranging tags making it useless for linearlayout I fixed it by setting Settings->Editor->Code Style->XML->Set from...->Predefined Style->Android
|
# ¿ Sep 8, 2019 22:45 |
|
Shadow0 posted:I'm trying to give my app an option to pick the language, but it's proving to be a lot more difficult than I thought. The android way is to just let the OS decide the language but I've done this for testing purposes (API 24+ only): code:
|
# ¿ Sep 18, 2019 14:28 |
|
I have a similar setup and it works with 4.1.0, maybe if you don't have variants with different versionnames you can just have it under defaultconfig like I have:code:
|
# ¿ Oct 25, 2020 09:10 |
|
Twerk from Home posted:Is okhttp still the de-facto default http client option? Is there anything else out there? I have a pretty high trust in jetbrains so if I started a new project I'd try https://ktor.io/docs/clients-index.html you can plug in okhttp engine into it too
|
# ¿ Dec 5, 2020 04:12 |
|
Tuxedo Gin posted:Thank you so much for the reply. I'll do some more reading and research into PAD. It checks a lot of boxes, though it looks like I have to upload everything in a pack to the play store, which means if I change one of the packages, I'd have to submit the entire app for an update. Is there any way to pull assets from my own servers so I can control them and make changes on the fly and handle the download/storage/update within the app? Or is that not possible for security reasons? trying to protect data from a hostile user who has root access, can edit bytecode and intercept network requests is pretty hopeless and wasted effort, just put data in Context.getExternalFilesDir(), smaller structured data into sqlite and have the app delete them when subscription is inactive I remember in 2010 I had paid downloads be encrypted with public keys, I expected it would thwart a 12 year old hacker but not a 14 year old Vesi fucked around with this message at 07:20 on Jan 26, 2021 |
# ¿ Jan 26, 2021 07:14 |
|
Good Sphere posted:How easy is it to develop for an older version of Android, like 8? I could make different SDK settings, but does that mean I need to write older code? Is Kotlin out of the picture? kotlin should be fine since it's just turned into jvm bytecode biggest problem is all more modern apis will rely on androidx which requires sdk 14/15, also tls version will probably be insecure
|
# ¿ Apr 20, 2021 18:49 |
|
mobby_6kl posted:Yeah that's what I thought but it seems to actually work ok as long as I'm also not drawing anything. By mothership I just meant the main activity, though I suppose motherhood works too If they're in the same package you don't need to bother with any IPC stuff you can get the data from the service any way you want to, you can think of it like as a singleton. just try to start the service from the activity in onCreate and it'll either start it from scratch if it's not running or just do nothing if it's already running In onServiceConnected you'll get the definitive instance of the service, but you can also access any of its static fields anytime in the activity If you want to use the latest practices you'll write the data into a a StateFlow/SharedFlow from the service then listen to it from the activity
|
# ¿ May 31, 2021 12:34 |
|
Anne Bonny posted:According to https://firebase.google.com/docs/crashlytics/ndk-reports I need to "explicitly invoke the uploadCrashlyticsSymbolFileBUILD_VARIANT task after each build of your NDK library." for method names to appear in my stack traces.... there's gradlew and gradlew.bat in the project directory (same as the toplevel build.gradle) you don't have any variants so you'd be running from the commandline: gradlew assembleRelease uploadCrashlyticsSymbolFileRelease or Debug instead of Release for debug build
|
# ¿ Dec 3, 2021 11:33 |
|
|
# ¿ May 10, 2024 17:56 |
|
I switched to jetpack compose recently specifically to get away from recyclerview,, if you're just learning then maybe it's better to stick to the latest paradigms?
|
# ¿ Jul 19, 2022 19:52 |