• Breaking News

    Monday, February 8, 2021

    Android Dev - Weekly Who's Hiring Thread - February 08, 2021

    Android Dev - Weekly Who's Hiring Thread - February 08, 2021


    Weekly Who's Hiring Thread - February 08, 2021

    Posted: 08 Feb 2021 06:00 AM PST

    Looking for Android developers? Heard about a cool job posting? Let people know!

    Here is a suggested posting template:

    Company: <Best Company Ever>
    Job: [<Title>](https://example.com/job)
    Location: <City, State, Country>
    Allows remote: <Yes/No>
    Visa: <Yes/No>

    Feel free to include any other information about the job.

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

    Best practice to store encrypted data in android.

    Posted: 08 Feb 2021 05:08 AM PST

    Hi guys,
    Honestly, I am not an expert on encryption and Keystores, so sorry in advance if this question doesn't make sense to you.
    STATE OF THE ART:
    I am working on an android application. The app has an onboarding process, in which the user will set a PIN for a "daily login" usage.
    So in the app, I have a PIN Login screen with a 5 digit pin, to access the app. In order to communicate with the Backend, I have to retrieve a specific token that we use as "authentication" between the app and the backend. This token is retrieved the first time the application runs the onboarding process and then is supposed to be stored somewhere.
    ENCRYPTION LOGIC:
    The Idea was to NOT store neither username nor pass nor PIN, but only the token encrypted with the PIN as a "decryption" password. So when the user inserts the pin, this will be used to decrypt the app token, in order to be used for every API call.
    ENCRYPTION ALGO : AES/CBC/NoPadding
    PROBLEM:
    I have a problem with the Token storing logic.
    I tried to use SharedPreferences to store this encrypted token but seems not to be the most secure and solid way to handle this.
    Now I am trying to use KeyStore, but I am not sure if it is actually the right "tool" to perform this kind of task. And in addition, I can't manage to store the token in the Keystore.
    QUESTION:
    What is the best way to handle this situation? How would do this?
    NB: I can't change the Backend

    Thanks a lot for your time

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

    Any Idea how to achieve this stacking behaviour, this is not bottom sheet dialog

    Posted: 07 Feb 2021 02:22 PM PST

    Verification of in-app purchase - why?

    Posted: 08 Feb 2021 04:25 AM PST

    I am implementing inapp payment, and there are several things I cant wrap my head around. One of them is verification of purchase.

    This is from official Google app mentioned in docs:

    /** * Verifies that the purchase was signed correctly for this developer's public key. * <p>Note: It's strongly recommended to perform such check on your backend since hackers can * replace this method with "constant true" if they decompile/rebuild your app. * </p> */ private boolean verifyValidSignature(String signedData, String signature) { // Some sanity checks to see if the developer (that's you!) really followed the // instructions to run this sample (don't put these checks on your app!) if (BASE_64_ENCODED_PUBLIC_KEY.contains("CONSTRUCT_YOUR")) { throw new RuntimeException("Please update your app's public key at: " + "BASE_64_ENCODED_PUBLIC_KEY"); } try { return Security.verifyPurchase(BASE_64_ENCODED_PUBLIC_KEY, signedData, signature); } catch (IOException e) { Log.e(TAG, "Got an exception trying to validate a purchase: " + e); return false; } } 

    What does this sentence mean:

    It's strongly recommended to perform such check on your backend

    I always thought that if somebody reverse engineer (decompile) my app, it absolutely does not matter if, where or how I am doing license verification (since they can just remove in-app payment from my apk completely).

    So why it matters? To me it seems like a lot of work for nothing...Or am I missing something?

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

    Android standard is to swipe right to delete a record/row?

    Posted: 08 Feb 2021 02:06 AM PST

    AFAIK, for iOS, you generally swipe left to delete a record from a list. Sometimes a trash icon with a red background appears on the right when you swipe left.

    However, from the Android tutorials I've seen online, they mostly swipe right to accomplish this?

    For example, in this video:
    https://www.youtube.com/watch?v=M1XEqqo6Ktg

    Is this an accepted Android standard to swipe right (instead of left) that differs from iOS?

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

    Combine flow, loading state on every change of flows.

    Posted: 08 Feb 2021 06:03 AM PST

    Combine flow, loading state on every change of flows.

    Okay so in image below is my flow combine. Is there a way to somehow do whole "onStart" block again with change of "upcoming" flow. its registered just first time. I need to get registered always when I set value to upcoming(MutableStateFlow). Data is mapped correctly but I want to have always on change loading state. I can accomplish this with OnEach with another value maybe but I need something like onStart. Thanks

    https://preview.redd.it/mzk80w7jf9g61.png?width=759&format=png&auto=webp&s=8b8c6fa3622b39bf8196c449109cdb6efc80e5a6

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

    I created this app to try out Hilt and Apollo with clean architecture and MVVM

    Posted: 07 Feb 2021 12:31 PM PST

    https://github.com/HamdiBoumaiza/ApolloRickAndMorty

    Hi there , I wrote this small app to try out Hilt and GraphQL with the android Client Apollo with some form of clean architecture and MVVM , it would be nice to get some feedback to some windows of improvements from all of you.

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

    Document Android Studio Version too in your open-source projects

    Posted: 08 Feb 2021 04:26 AM PST

    Document Android Studio Version too in your open-source projects

    It's been a pain figuring out which android studio version I need in order to contribute/build any open source projects, So I have created free icons that you can add to your docs to make it documented which studio version it is

    Artic Fox android studio

    beta android studio

    stable android studio

    submitted by /u/dev-ch8n
    [link] [comments]

    Need Help With Sockets

    Posted: 08 Feb 2021 08:02 AM PST

    This Is My Android Studio Client code :-

    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    butt = (Button) findViewById(R.id.butt);
    createbuttonlistener();
    }

    public void createbuttonlistener(){

    butt.setOnClickListener(new View.OnClickListener() {
    u/Override
    public void onClick(View v) {
    try {
    s = new Socket("192.168.50.207", 49999);
    }catch(Exception e){

    }
    }
    });

    This is my server runnin in eclipse :-

    import java.net.*;

    import java.io.*;

    public class run {

    public static void main(String\[\] args) { try { ServerSocket ss = new ServerSocket(49999); Socket s = ss.accept(); System.out.println("Client Connected"); } catch (IOException e) { e.printStackTrace(); } } 

    }

    Why does the cliet not connect to the server.. help

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

    Selectable Tag Adapter For Android’s Recycler View

    Posted: 08 Feb 2021 03:54 AM PST

    #android #AndroidDev I recently came across a screen that required single/multiple selection ui , which seems like an easy thing to do. But when i started, i realised it is a very interesting problem to solve . so here are my experiences : https://anshsachdevawork.medium.com/selectable-tag-adapter-for-androids-recycler-view-1c7628a61651

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

    How much would a dating app for a small user-base cost

    Posted: 08 Feb 2021 07:37 AM PST

    Hey everyone, a few friends and I came up with the idea of building a dating app for a small user-base or community. The users will not exceed 100k. I started by laying out the plan and completing the UI / UX designs. And now we are going to start with the development. Some of my friends are Software developers and have experience in Android App development (Will also build an iOS app but we won't talk about that here). But before we start, I have a few questions that I can find nowhere, so I though maybe this subreddit will help.

    My questions are:

    • How long will it take to build such an app, with simple features and a simple algorithm?
    • What database should we use?
    • How much will it cost for databases, publishing... ?

    Keep in mind everyone working on it is part of the team and doesn't expect payment, because we're building this for fun and for the community more than for the money.

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

    Managing audio focus of two instances of Exoplayer

    Posted: 08 Feb 2021 06:29 AM PST

    Hello,

    I'm using the media2 + exoplayer in my application, but facing problems to manage audio focus between two instances of the player.

    I need to have two open sound channels inside my app, which one is for media content and the other for TTS. But, if a TTS request starts my media need to stop and resume when the TTS finish. In my mind the AudioAttributes which sets audioFocus to 'true' in Exoplayer was enough, but maybe I'm wrong.

    Did some research and found the AudioManager, but just for android.media, not androidx.media2. What's the recommended approach for this case?

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

    Is Linux OS a better platform to develop Android than Windows or MacOS?

    Posted: 07 Feb 2021 04:18 PM PST

    Similar to how MacOS is a better platform to develop IOS Apps since they're both based on the same operating system (OS X) and it's easy to connect between a Macbook and IPhone, can the same be said for Android and Linux distros since Android is based on Linux?

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

    My Galaxy S9 is killing my BOUND service. What the hell Samsung?

    Posted: 08 Feb 2021 02:20 AM PST

    My app uses a foreground service (with persistent notification) that is bound to an activity if it's visible. Fairly standard stuff for things like music players, fitness apps etc.

    Recently I switched to a Samsung phone, and I've seen the bound service get killed in front of my eyes 3 times now. Like, while I was in the app and using it. It's not a crash, and the service worked on my old LG for years. Battery optimization is disabled for the app.

    How the fuck am I supposed to release this shit to users? I guess I can try and recover the service's state after it's restarted (START_STICKY), but that's still a ~3 second hickup I need to explain to a user.

    I hate Android.

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

    Disable navigation buttons and status bar?

    Posted: 08 Feb 2021 05:01 AM PST

    Is there any way to completely disable navigation buttons and status bars on an android app or android device?

    We are looking into making a tablet application which will be used in educational purposes and it's super important that the user can't exit the application in any way. The app has to be viewed in full screen at all times.

    We have root access on the devices, so that's not an issue.

    I've tried out some kiosk mode tutorials but still haven't got it working properly. I can hide the buttons/navigation bar but the user can still swipe down/up to show the navigation buttons / status bar.

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

    Looking for solution/creating a solution

    Posted: 08 Feb 2021 04:57 AM PST

    So I would like to have an app that acts as a front page for a file of PDF files. My church has a hymnal that is in 2 (large) volumes. The church has a subscription for the website, which furnishes each song as a PDF, so it can be put on a tablet. Trouble is, it's difficult to juggle between files using a file browser app.

    is there an app already made that is a database, where I can have a list of the PDF files and access them and return to the list quickly?

    submitted by /u/Stuff-and_stuff
    [link] [comments]

    Add text to ImageView

    Posted: 08 Feb 2021 04:11 AM PST

    I want to create some kind of text-image combiner app. So first you select desired text, then you select desired image, and the app will add this text to image. After that, you can save that image to gallery.

    I dont rly have any idea how to start with this (texts are different lengths, and they must all fit in image). I see a lot of posts that you can use ImageView + TextView, but I dont this this will work for exporting image to gallery, or am I wrong?

    any advice is welcome! thank you!!

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

    I learned Java and Kotlin

    Posted: 08 Feb 2021 12:00 AM PST

    Hi , im still a student in my second year of college. My department is new in my college its called "Mobile computing and smartphone's applications". Alright so i learned java basics and OOP in java. Then i learned Kotlin and started making simple android apps with sqlite database. In the current semester im learning advanced things in android and database. And after that they gonna teach me swift for ios and also game development. My question is what are the things that i should learn from outside the college , i mean what courses are good and useful for me. Should i learn python or any other languages. Should i learn flutter and dart. I really need someone to advice me . Im sorry if my English was bad.

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

    Visual programming app for Android - Ideas?

    Posted: 08 Feb 2021 03:21 AM PST

    Hi.

    I have develop an Android app (called FLX) that makes it possible possible to develop small applications or scripts on you Android phone using a Kotlin-ish visual programming language. Originally the idea for developing this kind of app was inspired by my own maker projects related. for instance, creating a DIY smart home environment.

    The visual language of the app is based on a Lisp variant I have developed. Right now I am preparing to release the source codes along with a REPL app for showcasing the Lisp implementation in Github. The source code will be available in here https://github.com/Fuusio/flx-lisp within couple of days.

    Currently, I have implemented the following features into my app:

    • Creation of UI screens in a declarative way using widget functions (i.e. bit similarly to Jetback Compose)
    • HTTP API for using HTTP methods + JSON API
    • Android Sensor API
    • File API for writing/reading files
    • Integration to BeanShell which means that you are able to execute Java scripts as a part of your application/script
    • Reflection API to access any Java/Kotlin class, method, or property
    • IFTTT integration to trigger IFTTT services via IFTTT Webhooks
    • Many Android APIs have been made available for the visual language
    • Application projects can be exported, imported, and easily shared. e.g. via email.
    • A shortcut for launching the developed application can be added to home sctrrn

    I will not list all the features, because the list is quite long already. More info can be from from my app web site: https://floxp.app

    And now the actual question: Do you have in my mind any suitable application domains or use cases for such application?

    I have one new feature under development right now because in need it in my smart home system: MQTT API for controlling MQTT enabled devices.

    Also because I'm an Lego fan, I want to extend my app to be able to control Lego Mindstorms. Think about it, finally a Mindstorms control system that would be also able to communicate also with Internet services and Internet enabled devices while controlling your Lego system.

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

    App marketing agency vs. personal knowledge

    Posted: 07 Feb 2021 09:58 AM PST

    I am fairly new to Android development. I have an app on the play store that is getting some small amounts of attention (500+ downloads). Today I got an email from an app marketing company. I did some research on the company and found them to be pretty sketchy and probably a scam. But this did expose me to the world of app marketing. I have some experience in design and marketing myself, but I am by no means an expert in the field. So far, my marketing strategy has been based on personal knowledge and research. Has anyone experimented with app marketing agencies before and had success? I'm not looking for names of agencies or anything, just stories. I don't have a lot of money to shell out for marketing, but if that is the most successful path I may find a way.

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

    Does the Android team accept volunteers to help with documentation? Asking for a friend...

    Posted: 07 Feb 2021 03:19 PM PST

    I've had the most fun for the last 30 minutes going through the Android Jetpack guide and searching StackOverflow and random blogs for solutions to code on the page that. does. not. compile.

    So far the most preposterous has been SavedStateVMFactory, renamed to SavedStateViewModelFactory as at July 2019.

    I've been an Android dev for more than a few years, but little things like this get in the way of enjoying the learning experience. I can't imagine what the newcomers go through!

    Look (Android team) guys, I will be the last person to even suggest bashing you. You do an awesome job already. But can we have community driven documentation that gets updated when things change?

    I'm ready to do my part!

    UPDATE at 10mins to midnight: ViewModelInject is deprecated. Use HiltViewModel instead.

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

    Stuck on how to save switch state in recycler view

    Posted: 07 Feb 2021 08:17 PM PST

    I'm building an alarm like app, where the user's alarms are saved in Room DB and are shown in a recycler view. The user can start the alarm by flicking the switch on the view holder. This then uses WorkManager to schedule a future notification.

    Right now, the switch toggle can trigger and remove a future notification with WorkManager. However, when I scroll through the recycler view, since it is recycling older view holders, it will show that the switch is on for alarms which aren't supposed to be on. Also, I need the switch to be on if the user closes and re-opens the app and the notification hasn't set off yet. Or if the notification went off whilst the app is open, have the switch turn off.

    I'm quite stuck on how best to resolve this.

    There are two ways I'm trying right now:

    1. Save "isRunning" state in DB for each alarm. Whenever switch is on, save to DB isRunning = true, else it is false. Then in onBind, the switch state = whether alarm isRunning or not from DB. Major issue is that when I have a 0 sec alarm, DB is updated, causing a refresh in the recycler view. It then turns on switch again to on since it sees isRunning = true, causing a bit of a loop. It will do 3 or so notification until it stops (isRunning = false from when notification ends).
    2. Try to monitor WorkInfo status with WorkManager (https://developer.android.com/topic/libraries/architecture/workmanager/how-to/managing-work). For each alarm in recycler view, I need to observe its WorkInfo status. If it's ENQUEUED, switch on, else switch off. But I can't get viewLifecycleOwner within adapter. I can try to observe in my fragment, but how do I notify my adapter which switch to turn on? If I have to make another DB update (similar to 1), I'm going to have the same issues again.

    So I'm just stuck on what to do. I'm a beginner to Android Dev and I don't have anyone that can help.

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

    Play Console privacy policy

    Posted: 08 Feb 2021 01:44 AM PST

    Hi to you all!

    I've done an update to an app, and now it requires a RECORD_AUDIO premission. I only use it with SpeechRecognizer, compare the results with an String and that's it. I don't have any DB or any saved record of the speech.

    Now the Console is telling me that i need to provide an online privacy policy, and i get that, i've read that there are a few generators that even host the policy for free.

    My doubt right now is, how much "pro" it has to be? Because i've read some policies of another apps that i assume use the permission in similar ways and some of them are like "Record audio policy - The app just record the voice and modify the voice with an effect, bla bla...", i mean pretty much only explaining what you do in order to that permission and thats it, only a few lines!

    Any of you have experience in this subject?

    Have a great day! Thanks!

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

    "Built In" Speech and Voice Recognition

    Posted: 07 Feb 2021 07:06 PM PST

    I have an idea for an app, that would be primarily audio controlled (mainly for Android Auto). Is there a way to use google's speech and voice recognition functions (like when you do "OK Google") or would I need to develop this on my own?

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

    How is the performance of the Android preview emulator on the Mac M1?

    Posted: 07 Feb 2021 02:19 PM PST

    I bought a Macbook air (2019, retina, i5 dual core 16GB RAM) 1 year ago to work as a multiplatform developer, but now that I grew in my career and I am working on bigger projects, using
    React Native to build for iOS and Android, the air doesn't cut it anymore, to the point our scrum master is giving me hints that my coding performance is low, and I know it is low because when using the Android Emulator for every click I do I have to wait a few seconds for the emulator to finish it's thing, this ads up and annoys me.

    So I am considering moving to the M1. I know the risks because it is a developer preview and it is a new architecture, so all I am asking is about performance. I have searched on youtube and the only Android tests I saw were people building the "hello world" default sample applications, nothing too complex, not enough to grasp the performance, because even my "old" air can run the deafult demonstration apps from android studio without a hiccup, it's only when building and testing large apps that it struggles.

    TLDR: Have you used an M1 mac for the Android emulator(preview)? I would like to know what m1 mac and which configuration did you try, and what was the performance like on the preview Android emulator for you? Thank you!

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

    What are you doing for auto configuration after factory reset in on your pipeline build devices?

    Posted: 07 Feb 2021 01:05 PM PST

    I'm trying to apply my container/linux CI/CD experience to build devices for android. In my world a new pipeline build has a Dockerfile or kickstart script to automate the machine's configuration (wifi, user account setup and config, app install & config, etc.). What is the equivalent in the Android development world for this? I thought ADB would be a good way to go, but it's getting very complex and... rickety. There has to be a smarter way to do a factory reset and provision all the bits needed to build and test my app. What are y'all doing?

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

    No comments:

    Post a Comment