• Breaking News

    Thursday, December 5, 2019

    Android Dev - How to Support Themes in Custom Views for Android Apps

    Android Dev - How to Support Themes in Custom Views for Android Apps


    How to Support Themes in Custom Views for Android Apps

    Posted: 05 Dec 2019 06:22 AM PST

    This is why Google didn't add Internet permission, and why "Just this once" isn't an option either

    Posted: 04 Dec 2019 11:50 PM PST

    For those who wondered why we don't have those, here's their response:

    https://www.reddit.com/r/androiddev/comments/ci4tdq/were_on_the_engineering_team_for_android_q_ask_us/evq6qww/

    I think in this case it's pretty reasonable.

    submitted by /u/AD-LB
    [link] [comments]

    Conductor in 2020

    Posted: 04 Dec 2019 10:05 PM PST

    Hello, would you still recommend using Conductor in 2020? The last release (3.0.0-rc2) was in March 2019, and BlueLine labs (its core author) has closed according to Google.

    submitted by /u/gallopinghorse
    [link] [comments]

    JetBrains Academy Welcomes Kotlin On Board! (if you still haven't started with kotlin this would be a great time)

    Posted: 05 Dec 2019 06:35 AM PST

    Can I create an offline version of an app with the APK?

    Posted: 05 Dec 2019 06:39 AM PST

    Hello r/androiddev. I a fairly new to the world of programming in general but have been working to learn a bit of Android app development.

    So once upon a time there was a particular game I really enjoyed on the play store. It is still there today, but the servers are offline and have been for at least a year probably, which is disheartening. I was wondering... with the APK of this app, would I be able to essentially create an offline version of this game so I can play it again? All saves would theoretically be made locally to my device, and I'm hoping I can automate weekly events based on device time.

    I hope this isn't just a pipe dream, this would be really amazing so I can continue playing my favorite Android game of all time, even if it is effectively single player with no contest/competitiveness.

    submitted by /u/Flagship_paperclip
    [link] [comments]

    Is there a free local messaging framework that works like FCM?

    Posted: 04 Dec 2019 10:34 PM PST

    I want to send messages from device A to device B, both of which are on the same local network. Of course, I want B to get the message even if it is in sleep mode, as with FCM.

    FCM is free and great, but I think there are some advantages for local framework (I am not sure if this is the correct term). For example, no Internet connection, shorter latency (I don't think Google's FCM servers are even in my country), or privacy (no data sent to Google). So, I have searched Google and found a thing called Parse. It seems free and open-source, but their documentation implies that it works as a layer above FCM. If so, that is not what I want; I want an independent local messaging.

    In short, I am looking for, Android A --> server application running on a local linux device like a Raspberry Pi --> Android B, Android C (single or broadcast). Is there such a thing?

    submitted by /u/evolution2015
    [link] [comments]

    I heard you like Streams, so I want to put a Stream in your Stream, dawg

    Posted: 05 Dec 2019 06:46 AM PST

    In my quest to optimise the app I'm working on (and to get rid of those pesky OOM errors for trying to do too much stuff in RAM), I made the decision to switch to streams instead of direct conversions. Specifically, I have a data object that would be written to the disk using GSON to (de)serialize when needed.

    The process I'm talking about is quite memory-hungry. I'm processing a 16MB binary blob into inflated numeric values (the file itself contains 12bit shorts that get inflated to Int32 values, then go through a mathematical transformation resulting in a Float, grouped in threes), which already eats roughly 200MB RAM. However the funky part is after this - I need to write these values into a specific CSV format, then slap that CSV into a JSON, and save it to the disk. This, obviously, causes some memory issues, especially on lower end devices.

    The current JSON structure is roughly this:

    • JSON data class
      • Field1: String
      • Field2: String
      • Field3: Instant (gets converted to a String on output)
      • Field4: String (the CSV previously mentioned)

    The optimal output would be the CSV being replaced with an OutputStream, and a custom streaming solution devised to actually stream the above values out (obviously I want to go the List<Triple<Float,Float,Float>>.asSequence().map { "${it.first},${it.second},${it.third}" }.asStream() way as this is the most simple, though just to complicate things, I also have a header I will have to write, so c-c-c-combo streams!). However even if I use a stream there, it will still consume lots of RAM if I don't stream the JSON stuff.

    So the actual optimal thing here would be streaming the object into a JSON format, and using that stream to write the file, WHILE the CSV data is streamed on-demand.

    Question is, what would be the best approach for this? I've got the JSON streaming bit and the file streaming bit done, but I'm struggling on the CSV stream to JSON stream part.

    submitted by /u/fonix232
    [link] [comments]

    I need help with maps

    Posted: 05 Dec 2019 06:28 AM PST

    so i'm trying to make an app where the user can choose a certain location, add a marker there and then add a picture to that marker but i can't find a way to do it anywhere. I know adding a marker is fairly easy but i can't seem to find a combination for this and i was wondering if any of you knew. Thanks beforehand

    submitted by /u/izombiefyyou2
    [link] [comments]

    Android runtime permissions in one (suspending) function

    Posted: 04 Dec 2019 02:15 PM PST

    Anko is deprecated.

    Posted: 04 Dec 2019 08:39 AM PST

    For CCPA compliance, if I choose "Restrict data processing", will that put me on safe side?

    Posted: 05 Dec 2019 01:54 AM PST

    Currently, for AdMob user, it isn't clear what are required to be done from developer, so that we can stay compliance to new CCPA.

    For GDPR, it is way easier, because Google does provide a library for us to do so - https://github.com/googleads/googleads-consent-sdk-android

    From AdSense control panel : https://i.imgur.com/tzG6VCd.png

    I was wondering, if we just select "Restrict data processing", will this put us in safe side, without performing any app code change? (I don't mind to have reduced earning, if that is a safe way to comply to new CCPA)

    Thanks.

    submitted by /u/yccheok
    [link] [comments]

    Question: should we still have "he" and "iw" for translations to Hebrew?

    Posted: 05 Dec 2019 12:52 AM PST

    I remember that in the past, when Android didn't officially supported Hebrew (and RTL in general), some devices used "values-he" and some used "values-iw".

    That's why for a very long time, at the office it was decided to always copy the string from "values-iw" into "values-he", juts in case.

    Is this still needed? Is there any reason to do it anymore?

    Just to be clear, we support Android from API 21 now, so my guess is that for a while now we don't need "he" anymore.

    submitted by /u/AD-LB
    [link] [comments]

    @AndroidDev : "Share your #IMakeApps story." I'm sure you have plenty of stories with the Play Store to share.

    Posted: 04 Dec 2019 07:14 PM PST

    How do you work smarter not harder?

    Posted: 05 Dec 2019 03:54 AM PST

    Do you have any tips for a new commer to android development in terms of working more effienctly?

    Tips like;

    What technologies/languages do you use? What resources do you use? What development Tools/IDE's do you use? What stratregies/models do you use?

    submitted by /u/psycotik666
    [link] [comments]

    Android Studio 4.0 Canary 5 available

    Posted: 04 Dec 2019 10:50 AM PST

    Making a webview application - alternatives?

    Posted: 05 Dec 2019 03:09 AM PST

    I currently have a app on the store that is based around a web app. It is essentially just a webview with API functionality that communicates with the website to update the navigation drawer (if a person is logged in or out, displaying avatars, etc).

    I currently develop this app on Java with Android Studio as you would with any application however it's becoming a pain in the arse to maintain because admittedly, I am not very proficient at Android/Java. I spend the majority of my time wrestling the smallest functionality which really drains my motivation to keep the android app updated. I haven't updated the application in months because I don't want to spend my whole day trying to wrestle with it.

    I'm wondering if there is any other ways or even software that I can use to develop my application? It's not exactly a sophisticated app. It's just web view that changes the drawer depending on an API and new activities are created depending on different pages to give the impression that the application is native. I understand there is frameworks like PhoneGap but that uses HTML, JS, etc to build the navigation drawer but I want it to be as native as possible.

    Cheers

    Edit: React native might be a good shout. How is it in 2019?

    submitted by /u/slothinspace
    [link] [comments]

    Google Merchant Account requirements

    Posted: 05 Dec 2019 01:28 AM PST

    I want to sell my game on Google Play. I am in a country that doesn't support this, but I have a bank account in a supported country. Is just having a bank account enough to register from that country?

    submitted by /u/railtracer95
    [link] [comments]

    Question: is it possible to create Java/Kotlin project inside Android Studio, to be launched on the PC alone instead of on Android?

    Posted: 05 Dec 2019 01:05 AM PST

    Sometimes I want to create a tiny app on the PC.

    I miss the time that I used to do both of those on Eclipse. When Choosing to create a new project, it doesn't offer me to create one for Java and/or Kotlin.

    For example, to handle files that I get from translations, to be put into the app (different folders names and hierarchy, sadly, as well as some junk files).

    Somehow I can open Kotlin projects and somehow run them (right click on the "Main" class for example and launch it, as I've noticed on ClassyShark project by Google), but I can't find a way to create a new project and launch it easily like I used to be able on Eclipse.

    submitted by /u/AD-LB
    [link] [comments]

    Building my First Android Application

    Posted: 05 Dec 2019 12:28 AM PST

    Is it possible to capture a high-res image while using ArCore?

    Posted: 05 Dec 2019 12:17 AM PST

    In my app I'm trying to use ArCore as sort of a "camera assistant" in a custom camera view.

    To be clear - I want to display images for the user in his camera and have him capture images that *don't* contain the AR models.

    From what I understand, in order to capture an image with ArCore I'll have to use the Camera2 API which is enabled by configuring the session to use the "shared Camera".

    However, I can't seem to configure the camera to use any high-end resolutions (I'm using pixel 3 so I should be able to go as high as 12MP).

    In the "shared camera example", they toggle between Camera2 and ArCore (a shame there's no API for CameraX) and it has several problems:

    1. In the ArCore mode the image is blurry (I assume that's because the depth sensor is disabled as stated in their documentation)
    2. In the Camera2 mode I can't enhance the resolution at all.
    3. I can't use the Camera2 API to capture an image while displaying models from ArCore.

    Is this kind of feature at all possible at the moment?

    submitted by /u/RexxarTheHunter8
    [link] [comments]

    Does everything inside View Model class needs Livedata? Can I use String, Custom objects without Livedata?

    Posted: 04 Dec 2019 10:52 PM PST

    Doubt about decompiling system apps vs normal apps

    Posted: 04 Dec 2019 09:58 PM PST

    I've worked on app theming back in 2013, by decompiling System apps and tinkering with the resources. I had 0 knowledge of Java or Android Apps at that time.

    Now I'm an intermediate Android developer and I noticed something strange.

    If I were to decompile a system app like a Music player, I would get the resources and the code in the form of .smali files.

    But if I were to decompile one of my apps, I'd get the code in the form of .java files.

    What creates this difference? Is it because the system apps are tied to the OS framework-res? Can someone share a light on this?

    submitted by /u/thelumiereguy
    [link] [comments]

    Android Studio 3.6 Beta 5 available

    Posted: 04 Dec 2019 10:33 AM PST

    No comments:

    Post a Comment