• Breaking News

    Wednesday, November 10, 2021

    Android Dev - Android developer exam

    Android Dev - Android developer exam


    Android developer exam

    Posted: 10 Nov 2021 03:14 AM PST

    What do I need to know before I take android developer exam from google? It worth taking it to get a job?

    Has anyone taken it before?

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

    Does anyone use a build server for day to day development?

    Posted: 10 Nov 2021 05:55 AM PST

    Hi folks,

    I'm looking at turning my Windows desktop PC (Ryzen 3600, 16GB RAM) into a build server, as my 15" 2018 Macbook Pro 16GB RAM with infamous throttling i7 is pushing me to my wit's end. More often than not, invoking gradle can cause the mac to crawl and if I'm listening to music it will cut out. My page file creeps up past 5GB so opening the iOS simulator is almost a guaranteed BBOD.

    I'm aware of several solutions which include:

    Tool Details
    Mainframer No longer maintained. Difficult instructions that assumes experience around SSH setup. WIP rewrite in Rust with IDE integration?
    Mirakle A fork of mainframer. Gradle plugin based.
    Buildman A new paid solution for pushing your builds to a remote server with integration in the IDE. The drawback is that it's a paid solution.
    Jetbrains Projector Use your IDE remotely through a webpage. It's early days yet for this tool and I believe I would need to clone my source to the remote machine.

    Are there any other options I should be aware of if I want to build locally? I know that Windows is not the fastest environment for Android development (down to IDE DLL install bloat and file system supposedly) so I was considering either dual-booting or setting up a gradle build server through WSL2. I would be very keen to hear from others who have even considered doing something similar. Thanks!

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

    Hello, my Gradle builds are slow!

    Posted: 10 Nov 2021 06:23 AM PST

    I'm so confused with Android tests. "test", "androidTest", no official documentation... what should I do?

    Posted: 10 Nov 2021 05:49 AM PST

    I'm completely lost, I can't find an official documentation how should I properly write tests for my app. I found some tutorials, but they are using old libraries and/or with Java. My app is written 100% Kotlin.

    I've added Robolectric, but the official documentation is giving me examples in Java. Beside this "issue", the documentation isn't up-to-date, it's giving me examples with deprecated API (e.g: setupActivity()... vs ActivityScenario).

    I've added @ RunWith(AndroidJUnit4::class) annotation to my class, but it gives me an error, saying that AndroidJUnit4 isn't declared, so I've moved the testing class under "androidTest" folder.

    Please bare with me, what I understand (correct me if I'm wrong) is that:

    - Unit tests should go under "test" folder

    - Android tests (where Context, Activity, Fragments, etc) should go under "androidTest" folder

    - Is Robolectric used anymore? Should I use AndroidX Test (or how it is called)?

    I know there are unit, instrumented and UI tests. Unit tests are just plain/mocked tests. But what about instrumented tests? UI Tests?

    I know that UI tests are heavy, and that's why people recommend using Robolectric, because it doesn't require an emulator/real device. Then were should I declare the Robolectric tests? Under the "test" or "androidTest" folder?

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

    [Jetpack Compose] Is calling and setting parent activity's variables considered bad practice and can cause some special bugs?

    Posted: 10 Nov 2021 01:31 AM PST

    Adding up my overview

    In my personal project i am musing a map (mapbox map actually) and I am feeding the map in to an AndroidView, which is standard way of handling the views which are not implemented into the compose. Mapbox has a built-in handling of location permissions and those are implemented in the example of finding of location (and displaying the pulsing location puck) in docs.link here

    And now to the question ->

    is it ok to call some parent activity's methods from composable code - minimal example

    MainActivity code:

    class MainActivity : ComponentActivity() { var exampleString: String? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { } } fun callingSomethodFromActivity() { Toast.makeText(this, "some method called", Toast.LENGTH_SHORT).show() } } 

    Composable code:

    @Composable fun MyExampleComposable() { val context = LocalContext.current val mainActivity: MainActivity? = if (context is MainActivity) context else null mainActivity?.callingSomethodFromActivity() mainActivity?.exampleString = "Some variable was set in parent Main Activity" } 

    I did not find any good resources talking about this topic and to be honest it actually feels a bit like cheating and i am feeling a bit bad about using this. On the other hand it would really make my life easier because map handling would be in this case much simpler if i could have some variables straightly in the activity, because I find it sort of hard to grasp to do all the work (dynamically drawing mappoints right in the compose composing)

    Any ideas/comments would be amazing especially if someone is already digging into dynamically drawing mappoints into some map implementation using Jetpack Compose.

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

    SimpleDateFormat parse issue in Android 11

    Posted: 09 Nov 2021 08:21 PM PST

    Hi. Since I migrated to Android 11 from Android 10, I am experiencing issue with SimpleDateFormat. When it reaches the parse method, it throws an Unparseable date exception. I did not change anything in this class. I believe it has something to do with Locale as it is using a new Locale("en_US"). Although, this is already fixed by changing it to Locale.US, are there any known issues related to this? Did anyone experience this?

    Update:

    I have tested this on several OS and it seemed like this is only happening on devices with Android 11 and 12 only.

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

    Seeking to Learn 1st Coding Language; any input is valued

    Posted: 09 Nov 2021 11:29 PM PST

    To simplify my gibberish:

     I seek any advice regarding coding I wish to utilize on Android OS. 

    DISREGARD MY UNINTELLIGENT ILL FORMATTED NONSE TO FOLLOW:

    -I have done some basic coding in a few classes a few years ago. Unfortunately life happened and i no longer has the spare time to put towards furthering my coding skills. But It came pretty naturally to me tho. Plus I enjoyed it. My best friend notes that I am a perfectionist, perhaps that's why it seems to suit me. I'm pretty tech savvy and want to delve full force into getting my coding knowledge up particularly to use on Android. So being a noob, I seek any advice and appreciate it in advance. Hate is also appreciated.

    -But I digress, I would like to get some literature and teach myself. My most knowledgeable acquaintances tell me learning Javascript is the way to go. Albeit I am warned it's not the easiest; I would like to attempt the most beneficial 1st language, with full intent to expand my knowledge on other languages as well. But one thing at a time...

    -Any advice for a noobie willing to put in the hard work and dedication to tackle a good challenge...? Am in over my head? Should I maybe find the nearest roof and take the fast way down?

    -As of right now I have one man in mind who's been doing it since like the late 90s who I am hopeful is able to bless me with some tutoring if his schedule permits. But I don't want to put all my eggs in that one BASKET. Thanks in advance

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

    Why does my Game have a black bar on the side?

    Posted: 10 Nov 2021 06:56 AM PST

    Here's a screenshot: https://i.imgur.com/NliL3Aq.jpg

    I'm dealing with Screen size issues.

    This black bar was not there when I was using my old phone (galaxy S7). But on my new one (Poco F3, 2400x1080p) there is this black bar.

    It is not visible in game! Only on the screenshot, which I found pretty weird. The big problem is that now the UI that is on the right is half-way offscreen and won't come out fully.

    I tried display.getRealSize(screenSize); it gives correct 1080x2400p res. If I try display.getHeight (deprecated), I get a odd smaller value and I have no idea where the phone gets that. By using that, the game is still fullscreen, but the right side UI comes out TOO far as opposed to too little.

    I guess my question is this: What's the best place to define screensize? Is there a way to get rid of that black bar? Do I have to disable some sort of invisible bottom bar of the phone? Or is the screen just actually smaller than it is in Pixels? Man this is sort of frustrating to deal with.

    Thanks to anyone who took their time to read this! If you have any ideas or dealt with this issue before, let me know please.

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

    Check out auto validated DateTextField for Jetpack Compose!

    Posted: 10 Nov 2021 02:25 AM PST

    Check out auto validated DateTextField for Jetpack Compose!

    We've created a DateTextField with on-the-fly validation (like Tinder app has) using Jetpack Compose. Input is being validated while user is typing it, so it is impossible to enter a wrong value. You can set date limits, format, default value and custom style. Feel free to fork the repo and suggest us what to improve!

    https://i.redd.it/wk00gskpvqy71.gif

    submitted by /u/gs-rocks
    [link] [comments]

    Ben Kadel live demoing MVVM + Compose + Hilt

    Posted: 09 Nov 2021 10:42 AM PST

    First job project

    Posted: 10 Nov 2021 04:07 AM PST

    Can a simple app that uses Google Admob, Google Play billing, Hilt, Vibrator service and built with "Clean Architecture + MVVM" with a responsive layout (constraint and tablets support) published to the play store land you a first job?

    I have so many uncompleted projects that I used different libraries in (Firebase auth and DB, notifications, SQLite, google play in-app reviews...), but the only completed is that simple vibration one.

    submitted by /u/No-Worry4518
    [link] [comments]

    Is there any way to tell which app is running in the foreground these days? Everything I've seen online so far uses deprecated code.

    Posted: 09 Nov 2021 08:19 AM PST

    Android Studio Bumblebee Beta 3 now available

    Posted: 09 Nov 2021 09:58 AM PST

    Android Studio Chipmunk Canary 4 now available

    Posted: 09 Nov 2021 09:58 AM PST

    HAXM - The system requirements are not satisfied :/

    Posted: 09 Nov 2021 08:11 PM PST

    HAXM - The system requirements are not satisfied :/

    I'm having trouble installing HAXM on my Win 10

    hmmm

    what can I do?

    turns out to be - without it I can not run an emulator

    https://preview.redd.it/2pg49e4q8py71.png?width=800&format=png&auto=webp&s=f309ccde842ab10cbabda68dc22669f7d983ea13

    https://preview.redd.it/evgzk7fx8py71.png?width=800&format=png&auto=webp&s=858a85de9ae5a8696302d1f5519db70ad404105f

    during - Android Studio and SDK install it reported this

    https://preview.redd.it/0txt7aja0py71.png?width=1064&format=png&auto=webp&s=4bab9a4c547ecc5128e3bd569dc8b449fde1c930

    so I headed to

    https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows

    and got the .zip

    and got this error:

    https://preview.redd.it/zg7279y60py71.png?width=853&format=png&auto=webp&s=b7b856f72566c58dc2387742a61f48a576c2e0d4

    Hyper-V is off in Windows

    https://preview.redd.it/c2pedebq0py71.png?width=860&format=png&auto=webp&s=6cc4f9f53de19aa07d670ff6045c798f088d98ba

    https://preview.redd.it/1w3ayi8a3py71.png?width=788&format=png&auto=webp&s=e3249253fcb875c1627195a230db63cc87bd539c

    I get this in the log ..\AppData\Local\Temp\haxm_install-20211109_2302.log

    Version: 7.6.5

    Output folder: C:\Program Files\Intel\HAXM

    Extract: checktool.exe... 100%

    Execute: C:\Program Files\Intel\HAXM\checktool.exe --verbose

    CPU vendor * GenuineIntel

    Intel64 supported * Yes

    VMX supported * Yes

    VMX enabled - No

    EPT supported * Yes

    NX supported * Yes

    NX enabled * Yes

    Hyper-V disabled * Yes

    OS version * Windows 10.0.17763

    OS architecture * x86_64

    Guest unoccupied * Yes. 0 guest(s)

    The system requirements are not satisfied.

    I checked in BIOS and ENABLED the Virtualization Tech

    and ENABLED VT-d

    https://preview.redd.it/uhw20pwbdsy71.png?width=1283&format=png&auto=webp&s=809c76046a6f4b75661921ba9b6f7b9613ced781

    I made it like this

    https://i.imgur.com/m6m9jiq.png

    https://preview.redd.it/f17hryqqdsy71.png?width=1281&format=png&auto=webp&s=ad79f711c66ab7c0727e7cae0f73338a63c0ba3a

    tried manual install - and am still getting the same :/

    hmmm what else could it be?

    thank you ...

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

    What's the Future of IDEs?

    Posted: 09 Nov 2021 09:03 AM PST

    Where should I host tutorial videos for my Android app?

    Posted: 09 Nov 2021 11:23 AM PST

    We've made some tutorial videos for our Android app. We want to have a button for the user to watch those tutorials on the welcome screen of the app. There are a couple of considerations:

    • We have a large number of users, so the tutorials will probably get a lot of views, hosting them on our own server might get expensive.
    • We don't want the users to exit the app to watch them (like go to the YouTube app for example) because that is a good way to lose a user. So we want them to watch the videos in the app itself.
    • We'll also need to have these videos on other platforms, like iOS, some smart TVs, etc.

    We have looked into the embedded YouTube Player for Android but some say it has quotas and then it costs, but we haven't seen any information about how much?

    What about other hosting platforms like Vimeo?

    Any suggestions?

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

    Is there a way to prevent users from installing a ripped version of the apk?

    Posted: 09 Nov 2021 03:50 PM PST

    I'm new to developing for Android, and there are so many ripped apk's all over the internet. How can I keep my hard work and many long hours of coding protected from being ripped off?

    Thank you so much!

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

    Android apps with really nice transitions/animations?

    Posted: 09 Nov 2021 03:23 PM PST

    Hey all - I'm a dev looking for some inspiration for some really clean Android apps on the Play Store that have nice animations and transitions. A lot of the Android counterparts of iOS apps that have nice transitions have been a bit underwhelming (Pinterest,Airbnb,etc...)

    Anyone know any really smooth Android apps with clean transitions and animations?

    submitted by /u/Travis-Scott
    [link] [comments]

    No comments:

    Post a Comment