• Breaking News

    [Android][timeline][#f39c12]

    Monday, March 1, 2021

    Weekly Who's Hiring Thread - March 01, 2021 Android Dev

    Weekly Who's Hiring Thread - March 01, 2021 Android Dev


    Weekly Who's Hiring Thread - March 01, 2021

    Posted: 01 Mar 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]

    Why are Developers from Ukraine excluded from #AndroidDevChallenge ?

    Posted: 01 Mar 2021 12:17 AM PST

    According to https://services.google.com/fh/files/misc/androiddevchallenge-compose-official-rules.pdf

    developers from some countries and areas are prohibited to participate. To save you a click:

    not a resident of Italy, Brazil, Quebec, Russia, Ukraine, Kazakhstan, Belarus, Crimea, Cuba, Iran, Syria, North Korea, or Sudan);

    While some countries are understandable to be on the list, others just bamboozle me.

    Italy (why ?) Quebec (it's Canada, what have they done wrong?)

    Russia (due to sanctions and occupation of Ukraine's Crimea)

    Kazakhstan - no idea, only guess is that they are on pair with Belarus with their irreplaceable leader

    Cuba, Iran Syria, North Korea or Sudan are obvious i think.

    But why Ukraine? Feels like we are being punished because part of our country was attacked by Russia?

    I really wanted to participate and at least get an entry prize - lego for my future baby to show her what daddy does.

    To Mods - I'm asking about directly related android challenge conducted by google and trying to understand its limitations. So I consider it to be directly related to Android Development.

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

    LiveData expected behaviour

    Posted: 01 Mar 2021 11:59 AM PST

    Hello.

    In case you have a LiveData in your ViewModel, which uses a SwitchMap so that when it changes, load new data from the repository, should that LiveData still be there when you navigate back to the Fragment observing the ViewModel?

    I'm asking because I'm using this pattern for list and detail fragments. And when selected, the element details is loads correctly in details Fragment. But when navigating back to the details Fragment without selecting another item, details Fragment shows nothing and LiveData apparently is null.

    Ps: Have it posted in StackOverflow too with more details:

    https://stackoverflow.com/questions/66420907/livedata-switchmap-in-viewmodel-only-returns-data-the-first-time

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

    Complying with GDPR

    Posted: 01 Mar 2021 11:57 AM PST

    I think this is a generic enough question but if it isn't then please delete or whatever lol. I'm making a game in gdevelop (if that matters, it uses psuedo code so i'm not going to have specifics here as far as coding in my game goes) and planning to sell it for a fixed price on google play. Offline, no ads, no ingame purchases, no login or any data entry, no google analytics (unless that is included automatically when you add to it google play?) or 3rd party crash reports. I'm using just base gdvelop tools to make it and haven't added any 3rd party stuff to it while making it. My game does pull time from my players device to set the time ingame, and it writes information to storage (and i believe that exists in a savefile but honestly i'm not 100% sure how that sort of thing works), either way none of that comes back to me in any way, it all stays on their device.

    Is there anything that I could possibly need a consent form for that I'm not aware of? Say, in relation to google play's developer console and what it reports, or anything else?

    (also just to mention, by set price I mean $0.99. This is my first game and I don't think it's going to make much money but after looking into privacy laws, it scared me away from monetizing it with ads, and my goal now is to not collect any data whatsoever)

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

    Android 12- Features That You Need To Know

    Posted: 28 Feb 2021 10:16 PM PST

    Android 12 is here! Google releases a major software update each year to its android mobile operating system. In 2020, it released Android 11. In 2021, it's announced Android 12 and is now available in the form of a developer preview. With this initial build, users can now install the OS on compatible devices. Google is improving and presenting a host of features in its most recent iteration of Android. Changes to media handling and notification support, improvements to privacy and haptic feedback and more polished notification UI all make the cut. Let's see the major confirmed features of Android 12.

    Features of Android 12-

    1. Easy Wi-fi Sharing-

    In Android 11, if you want to share your current Wi-Fi connection with anybody, you can create a QR code easily. But in Android 12, you can avoid barcode scanning and just click the "Nearby" button you can below the QR code. This will use Android's Nearby Share feature to transmit the Wi-Fi credentials to whom you like. While scanning the QR code is quite simple, this new feature allows you to share the connection data to multiple individuals without handling your phone around for everyone to scan. That is certainly more helpful!

    2. More Screenshot Markup Options–

    With a Pixel device, if you capture a screenshot, you can markup that shot with paintbrush-like tools. With Android 12, you can add text, Emoji and stickers to your screenshots using the same tool. This is not a big change but, it may prevent users from needing a third-party app to do the same thing.

    3. Improved Cookie Management-

    Android 12 is adding support for SameSite cookie behaviors to WebView. The SameSite feature enables developers to announce in the case a cookie must be restricted to a specific site. This inclusion must enhance the cookie management of Android 12 across various applications and OS. The top Android browsers already support this feature.

    4. AVIF Image Support-

    Android 12 launches AVIF image support. It is an image format that promises improved image quality over JPEG without penalty for larger file sizes. The format uses open-source video codec AV1, that was first introduced to Android 10.

    5. Compatible Media Transcoding-

    Though HEVC is growing in popularity, the video compression standard is not supported by all apps. Now, Google is ready to introduce a transcoding layer to Android 12 that will pet unsupported apps to take advantage of video compression. Video capture apps that don't support HEVC can now request Android 12 to transcode that file in AVC – a more available video compression format. Google

    Google noticed that this is a stop-gap solution and urges developers to include HEVC support for their applications. This feature's performance is dependent on a device's processing power. For example, a one-minute 1080p video takes nine seconds to transcode on Pixel 4, proposing that it may not be appropriate for spending gadgets. Considering all things, the element will be accessible for all Android 12 gadgets with video capture capabilities.

    6. Haptic-Coupled Audio Effect-

    Google is allowing developers to mate haptic feedback patterns with audio in Android 12. Duration and strength of vibrations are taken from audio cues, that adds more engaging layer to media playback or alerts. For instance, a video calling app could use custom ringtones to identify caller with haptic feedback, or you could simulate rough terrain in a racing game," explains Google.

    7. Notification Enhancement-

    Notification system of Android 12 will be redesigned to enhance usability, functionality and aesthetics. Google is changing controls and drawers and rebuilding animations and transitions. Also, it has targeted responsiveness. Android 12 will get developers to get rid of transpolines, middle-man broadcast services or receivers. Trampolines bounce users from notification to application. Google needs notification buttons to take users directly to the app itself in Android 12. Also the company is delaying some foreground service notifications' display by till 10 seconds. This will provide short tasks a comprehensive window to complete before knocking the user.

    8. Rich Content Insertion-

    Google is offering users more control over rich media through the keyboard, clipboard and drag and drop. New API will allow users to insert and move media from any of these sources. Supported formats will include "plain and styled text to markup, images, videos, audio files and so on per Google. For users, it should rapidly process file sharing or styled text to other or across apps.

    9. Double-Tap Gesture For Pixel Phones-

    Google could be attempting to bring a double tap gesture to Pixel phones with Android 12. By giving a quick double tap to the phone's back, can invoke Google assistant but it can be configured for other actions also, like taking a screenshot, pause/resume media playback, open notification shade and open the recent apps view. Double-tap gesture was first spotted last year as a potential android 11 feature. It was rumoured to supplant the "Active Edge" squeeze gesture, however it won't ever materialise. Google is working to revive the feature, codenamed Columbus, for Pixel phones.

    10. Android 12 Updates Through Google Play

    Android Runtime (ART) will be included to Project Mainline – Google's Play system updates program. This will allow the updates of form push key to ART and other necessary Android 12 services through Google Play, avoiding the necessity for system updates to change these features. Google also notes that more module updates will be pushed through Project Mainline in the near future, including its transcoding improvements.

    11. Permissions Dialog-

    Google launched the permission handling feature which is helpful in case you want to stay alert about how applications use your mobile's sensors and other accesses also. Now, with Android 12, the permissions dialog box needs a shortcut for always allowing access in settings.

    12. Hidden Selfie Camera On Pixel 5-

    Detected by Android Police, Google is now giving Pixel 5 users an option to hide the punch hole in Android 12. When setting is enabled in the Developer menu, the selfie camera is hidden by black bar. Status bar will also be displayed in this bar.

    13. Easier Debugging And Testing Of Changes-

    Simplifying the test opt-in transformations for android developers that can impact their apps, Google has made most of them toggleable. By the use of toggles, developers can forcefully enable and disable the changes separately from adb or Developer options.

    You can also – How to reduce Android App size during development?

    Wrap up-

    These are some of the important features in android 12 that you must know. There can be some others too. If you're thinking to build an android app with advanced features, then you must know these features before starting development.

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

    Talking Kotlin – Catching Up With Roman Elizarov

    Posted: 01 Mar 2021 07:14 AM PST

    Signing Certificate Requirements

    Posted: 01 Mar 2021 03:49 PM PST

    Hi all, i'm planning to create a signing certificate for my Android app signing. I'm looking for the certificate specifications like key size, certificate authority etc. My app needs signing with both V1 and V2 signatures, so the certificate i'm going to create must be compatible with both signature schemes. I'm prefer to own and manage the signing key myself than using Google's managed signing service.

    Here are my questions.

    1. https://source.android.com/security/apksigning/v2 mentions that V2 works with RSA: 1024, 2048, 4096, 8192, 16384 key sizes only. I could not find limitations of V1. Are you aware of what key sizes V1 scheme supports?
    2. AFAIR, Android signing certificates can work with self signed certificates. Is there any reason anyone would want to go with certificates issued by CA, even a private CA? Should i prefer one over another?
    submitted by /u/justanothergult
    [link] [comments]

    Problem with buy the play console

    Posted: 01 Mar 2021 03:36 PM PST

    I have a problem when put my credit card for buy a developer account android, it say, your request could not be made, with any credit card, please help me.

    Tengo un problema al poner mi tarjeta de crédito para comprar una cuenta de desarrollador de Android, dice, su solicitud no se pudo realizar, con ninguna tarjeta de crédito, por favor ayúdeme.

    Error [ OR-CCSEH-24 ]

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

    Retrofit 2 working on the emulator but not on a physical phone

    Posted: 01 Mar 2021 03:14 PM PST

    Retrofit 2 working on the emulator but not on a physical phone

    Hey Guys, on this very sub someone suggested I switch to retrofit 2 from Volley to fix an issue I was having. The issue is: image and other parameters successfully upload from the emulator to the server. but images and other parameters do not upload on the server when I try it on my physical phone. Please see the code below and provide me with any suggestions. I have been at this thing for a while and I would to fix it and get on with my life.

    mode

    Interface

    ApiClient

    code in the fragment that supposes to send data to the server

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

    How many operational android devices currently owned per Android user (as a developer)?

    Posted: 01 Mar 2021 09:04 AM PST

    I am working on an app to be used on multiple devices (forming a personal mesh of sensors for a specific use case) and would like to get a sense of the number of devices including the primary device a person uses for actual communication, retired but still functional devices (older versions, cracked screens, etc), and additional devices with other form factors not meant for communication (tablets, android watches, etc..). Appreciate any additional comments in addition to poll responses to shed light on what the user space looks like in this regard.

    **note\* in the title I added* (as a developer) since I assume we tend to hang on to devices for testing and such skewing the results, depending on the response to this poll I may do a follow up poll to see what the situation with non developers is like either by asking what others here know about there acquaintances or else posting in a regular Android forum.

    Myself as an example, I can count one phone with an active sim, another three phones (two with cracked screens and another running Ice cream Sandwich), one tablet used for reading, and another two tablets (cracked but functioning screens) bringing the grand total to seven devices.

    View Poll

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

    Compose plugin for Android Studio and Intellij Idea

    Posted: 01 Mar 2021 06:56 AM PST

    I'm super excited to announce my first plugin for Intellij Idea and Android Studio. It allows you easily wrap your Composable with Row, Column and etc.

    You can download it by link below

    https://plugins.jetbrains.com/plugin/16174-wrap-compose
    or from Plugins section in Android Studio or Intellij Idea

    Hope it will make your development easier and more enjoyable

    Have a great day!

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

    Android Developers let go during the pandemic...how was your job search?

    Posted: 01 Mar 2021 02:10 PM PST

    Disable Richtext i.e. HTML / Spanned Text in Edittext

    Posted: 01 Mar 2021 02:01 PM PST

    I am working on a basic notes app. I currently do NOT want to support rich text as its not something I offer as part of the app. The problem I run into is when I copy paste text from a webpage Edittext by default captures HTML formatting like colors etc.

    How can I disable this? Been hunting stackoverflow but have yet to come across a straight way of achieving this. The behavior I am looking for is like Google Keep where even copy pasted webpage is presented as regular text.

    Not sure if its something basic I have overlooked but would really appreciate some guidance

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

    UI SFX Marketplace

    Posted: 01 Mar 2021 01:57 PM PST

    Hi Community. I'm starting work on a Sound FX marketplace that enables audio engineers with UI sound libraries to sell direct to developers. Wondering if there's demand from this community or similar for this. Your honest feedback appreciated.

    Thank you in advance,

    🥔

    submitted by /u/dm-me-potatoes
    [link] [comments]

    FOSS video playback project needs devs (Java/Kotlin)

    Posted: 01 Mar 2021 05:10 AM PST

    The jellyfin project are re-writing the playback functionality of their AndroidTV client. If you've got the skills to help, they alway need more devs.

    https://github.com/jellyfin/jellyfin-androidtv

    https://github.com/jellyfin/jellyfin-androidtv/labels/playback

    submitted by /u/8ceyusp
    [link] [comments]

    Is it a good idea to start learning from the documentation as a beginner ?

    Posted: 01 Mar 2021 12:25 PM PST

    Hello, I'm new to programming, my aim is to become an android developer, of course, I was wondering if https://developer.android.com/courses was a good first step for someone like me, who's just starting, and what would be the next step after that. If not what would be a good starting point to learn Kotlin?

    Thank you !

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

    Implement more than one syncadaper

    Posted: 01 Mar 2021 11:31 AM PST

    Hi i can implement my sync adapter and account service now my question is im trying to run 2 or more diff sync adapters and account so i can i add these to the manifest ? Most stuff works fine but i think i need to work out how to add these extra classes to the manifest and achieve what i want to do hopefully thanks .How do i add them or is this possible at all .

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

    new to android programming, failed to save data in storage

    Posted: 01 Mar 2021 05:31 AM PST

    I am new to android programming, tried to save app data as csv, but failed. Please help. Next is the code. I tried to use file writer. I made public void writeStringAsFile(final String fileContents, String fileName) at the end and in public void onSensorChanged(SensorEvent sensorEvent) I call the writeStringAsFile but nothing happens.

    package com.example.firstsensorcomputing;

    import androidx.appcompat.app.AppCompatActivity;

    import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.os.Environment; import android.widget.TextView; import android.widget.Toast;

    import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.Arrays; import java.util.logging.Logger;

    public class MainActivity extends AppCompatActivity implements SensorEventListener {

    private SensorManager sensorManager; private FileWriter writer; Sensor accelerometer; long starttime = 0; double[] mag = new double[60]; int i = 0; double min = 0; double max = 0; double var = 0; double std = 0; int interval = 2; TextView text1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // register sensors text1 = (TextView) findViewById(R.id.text); sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); accelerometer = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); sensorManager.registerListener(MainActivity.this, accelerometer, sensorManager.SENSOR_DELAY_NORMAL); text1.setText("min " + min + " max " + max + " var " + var + " std " + std + " "); } @Override public void onAccuracyChanged(Sensor sensor, int i) { } @Override public void onSensorChanged(SensorEvent sensorEvent) { double magnitude = Math.sqrt(sensorEvent.values[0] * sensorEvent.values[0] + sensorEvent.values[1] * sensorEvent.values[1] + sensorEvent.values[2] * sensorEvent.values[2]); long millis = System.currentTimeMillis() - starttime; int seconds = (int) (millis / 1000); int minutes = seconds / 60; seconds = seconds % 60; min = minimum(mag); max = maximum(mag); var = variance(mag); std = standardDeviation(mag); if (seconds % interval == 0 || i == 60) { //Arrays.fill(mag, 0.0); text1.setText("min " + min + " max " + max + " var " + var + " std " + std + " "); writeStringAsFile(String.valueOf(text1.getText().toString()), "mydata.csv"); i = 0; } else { mag[i] = magnitude; i++; text1.setText("min " + min + " max " + max + " var " + var + " std " + std + " "); // } } public static double minimum(double data[]) { if (data == null || data.length == 0) return 0.0; int length = data.length; double MIN = data[0]; for (int i = 1; i < length; i++) { MIN = data[i] < MIN ? data[i] : MIN; } return MIN; } public static double maximum(double data[]) { if (data == null || data.length == 0) return 0.0; int length = data.length; double Max = data[0]; for (int i = 1; i < length; i++) Max = data[i] < Max ? Max : data[i]; return Max; } public static double variance(double data[]) { if (data == null || data.length == 0) return 0.0; int length = data.length; double average = 0, s = 0, sum = 0; for (int i = 0; i < length; i++) { sum = sum + data[i]; } average = sum / length; for (int i = 0; i < length; i++) { s = s + Math.pow(data[i] - average, 2); } s = s / length; return s; } public static double standardDeviation(double data[]) { if (data == null || data.length == 0) return 0.0; double s = variance(data); s = Math.sqrt(s); return s; } public void writeStringAsFile(final String fileContents, String fileName){ Context context = getApplicationContext(); try{ writer = new FileWriter(new File(context.getFilesDir(),fileName)); writer.write(fileContents); writer.close(); }catch (IOException e) { System.err.print("Something went wrong"); } } 

    }

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

    We Need Better than Gradle — Adam Erb

    Posted: 28 Feb 2021 01:32 PM PST

    Any developer out there that also loves the idea of having artificial intelligence become a personal assistant and boost our productivity to help us achieve our goals?

    Posted: 01 Mar 2021 10:43 AM PST

    Hi everybody

    We are a startup working on using artificial intelligence to create a digital organizing assistant that completely takes over all the organizing, planning, scheduling, prioritizing and managing of your to-do list and calendar for you. It will then remind you of the right things at the right times so that you don't have to worry about anything anymore. To get better insights into what people exactly need to be more productive and achieve their goals, we are offering the following service:

    You get your own personal productivity assistant whom you can tell all your to-dos and anything that is going on in your life. They will then actively organize your life for you, schedule your to-dos, remind you of the right things at the right time, check up on you and motivate you to get your things done and be productive. No procrastination anymore :D

    Let me know if this sounds interesting for you!

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

    Defining CoroutineScope within an Android library project

    Posted: 01 Mar 2021 09:52 AM PST

    I'm working on an Android library that will be used by a few different apps, and I'm using the well-known combination of Retrofit + Moshi + Kotlin Coroutines to perform networking tasks. The thing is, the networking tasks are opaque to the app module, so I can't take in a CoroutineScope from the consuming app to perform network requests, because they happen in the background (data sync). Since this is a library project, there is no lifecycle-aware component like Activity or Fragment that I can hook into.

    My question is: what's the best practice to define a CoroutineScope within my library project? Would it be enough to just declare an object singleton that conforms to CoroutineScope, and just make a new Job() inside there? Should I be using SupervisorJob instead?

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

    Google Jetpack Compose UI Toolkit Now In Beta

    Posted: 01 Mar 2021 09:48 AM PST

    Would the performance of Jetpack Compose's preview feature improve once it's out of Beta?

    Posted: 01 Mar 2021 07:51 AM PST

    Hi all. So, I am starting to explore Jetpack Compose. As of now, the preview feature of Jetpack Compose is very resource-intensive for my laptop which has a 3rd Generation i3 processor. Is this because it's currently in beta, will it have a significant performance boost when it becomes Stable?

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

    Screen navigation in Android using fragments with only add + show/hide without replace at all.

    Posted: 01 Mar 2021 01:15 AM PST

    Hello, i found interesting approach of screen navigation in Android using fragments with only add + show/hide without replace at all.

    The example : https://github.com/grishka/appkit/blob/master/appkit/src/main/java/me/grishka/appkit/FragmentStackActivity.java

    Also author does not use system backstack. He emulates it by hand.

    I see the following advantages:

    • fragments does not losing state when on "stack", no onDestroyView is called
    • app uses less CPU when do back - not needed to recreate view for fragment
    • we can !!! communicate between fragments directly with simple callbacks, for example to get result from fragment. We no need use fragment result api and others.

    Disadvantages:

    • need manually implement it (it is not so hard)
    • app consumes more memory because all fragments in memory. Especially when "stack" is deep

    This approach is similar as activities work by default - each new screen opened above previous and all activities stay in memory.

    What do you think about this approach ?

    What the reason that Google recommends use replace.addtobackstack for screen navigation? They also use this in navigation component. In my opinion replace gives many problems , only advantage is less memory. Why not just use add + show/hide with all in memory? For activities it was not the problem , right?

    Thanks!

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

    What do you do on your first day at work?

    Posted: 01 Mar 2021 01:29 AM PST

    Let's talk about first days! Be it as an entirely new Android engineer at work or just moving to a new employer/client. Share what do you usually do!

    For me, before installing any company specific stuff/Android Studio I'm used to installing git, homebrew and gitkraken. Other than that it's the usual email, slack, company specific tools etc. Also whenever I can I set-up an additional expectation setting meeting with my manager to align our understandings with the role and the team - I know that this should be clear from the get go. But this allows me more to clarify and learn more specific stuff about the real work.

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

    Chaquopy – Python SDK for Android

    Posted: 01 Mar 2021 04:33 AM PST

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel