• Breaking News

    Thursday, April 30, 2020

    Android Dev - Android Studio 4.1 Canary 8 released - Emulator now embedded in the IDE tool window 😃

    Android Dev - Android Studio 4.1 Canary 8 released - Emulator now embedded in the IDE tool window ��


    Android Studio 4.1 Canary 8 released - Emulator now embedded in the IDE tool window ��

    Posted: 29 Apr 2020 01:55 PM PDT

    Resource on where to start with Android development

    Posted: 29 Apr 2020 11:31 PM PDT

    Something that I think I could have had when I started with Android development:

    Raywenderlich.com Tutorial team put together this Android Table of Elements. This is a learning roadmap for Android developers: everything you need to learn, in a recommended step-by-step order.

    https://www.androidelements.com/

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

    Android Admob Native Ad has blocking UI thread

    Posted: 29 Apr 2020 11:16 PM PDT

    I see the Admob Native Ads is the awesome ad to flexible UI which can be easy like up with my application. So, I have tried to implement Admob Native Ads into my Android App. But I got the issue when load ad. My app has been blocking UI Thread when the ad is being loaded. I have used Native Ads for recyclerview. This is example for that which I have forked from google example repository and modify for the same with my implementation.

    https://github.com/sinhpn92/admob-native-ad-example

    I have tried to put the load ads inside asynctask or kotlin coroutines thread but It's still have this problem. I did upgrade to latest version.

    I have some question:

    • Have anyone has facing this issue?.
    • Is that problem of admob sdk?.
    • Have any suggest to solve this issue?.

    Thanks for your time.

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

    Clean up your RecyclerView Mess - LIVE CODING Tonight @8PM IST

    Posted: 29 Apr 2020 11:51 PM PDT

    Google terminated my Developer account without warning

    Posted: 29 Apr 2020 04:38 AM PDT

    Google terminated my Developer account without warning

    Hello, readers of Reddit, I'm writing to you from cold Russia:)
    I'm here to share with you one more story of a developer's account lock-out in Google Play. On the 26th of March, in the evening, I received a standard email from Google:

    Letter from Google

    At first I didn't understand what's the problem is and of course I sent a notice of appeal. I received a standard answer. The same was with the next notice of appeal. Now I already have 7 notices of appeal. I don't even receive any automatic answer for the last ones. It seems to me that a few days ago I found out the reason of a possible lock-out. One of my games was tested by the publisher at his account. During this period the game got two warnings as a result of violation with incorrect integration of SDK of the necessary services. The publishers didn't like the game and they returned it to my account. And maybe their rejects came to my account together with the application. I'm not absolutely sure in it, but this is the only rational basis.
    That's why be careful with transference of the application after its rejects on the other people's accounts. I can't understand the politics of Google. Why should I be responsible for the other people's rejects with the help of my account? Whereby their account continues to exist. Is it fair? I also want to add that I'm not a creator of trash applications and games. I had 2 qualitative games on my single account (which is more than two years old). I spent a lot of thousands of dollars, as well as energy and time on each game. And we wanted least of all to violate the rules and somehow be in conflict with the bots from Google.

    My first app was a cute door simulation game. A huge amount of effort was invested in it. It had about 30 thousand installations. Unfortunately, the application could not pass the test at the publisher. And had the status: Reject. This was due to the obsolete Appodeal SDK. I made plans to revive this game and retest the publisher with the hope of a positive result. (I apologize for the screenshots with the text, this is not an advertisement)

    Menu

    Map_1

    Map_2

    The second game was a dark platformer about black substance. This game has gone through many iterations. And during the next test, I got a ban on the whole account. Most likely this particular game didn't please Google bots.

    Substance

    What I have learnt and what I can share with people who are in the same situation is the following:

    • Be careful with the transfers of the applications as you can get application rejects from the other people's accounts and damage your account. (I'm not absolutely sure in it) - the way of searching for the people from Google at LinkedIn + Rocket Reach is useless. I tried to find people working in support with the help of these services during month. Unfortunately, in all the cases I faced up with ignoring. If someone wants to do this, then search for: Appeals Specialist at Google, Play Developer Support Specialist, Developer Support Specialist - Accenture\Vaco at Google, Support Appeals Specialist - Accenture\Vaco at Google. As I understood, Google transfers the part of operations concerning the support of the users to the companies Accenture and Vaco. But these are my personal insights and guesses. You shouldn't accept them at their face-value. Possibly, somebody will be lucky and he or she will find a person who will answer.
    • Sending emails is also quite useless. But here I was lucky and two people replied to me at once. One of them was from Policy Team and the other one was a Developer Advocate. They both told me that they felt sorry but couldn't help me and they gave me a link for a standard form of a notice of appeal.
    • If your account brings you less than 5 thousand dollars per month for inner purchases, then the likelihood that your notice of appeal will be considered by an alive person is about 1%. Especially this situation heated up because of COVID-19. Maybe they don't have enough specialists.
    • The variant of asking for help people who I know and who work in Google also doesn't work (they did an internal inquiry).
    • Writing on the Google Help Forum is also useless.

    Finally, there is only a variant with making this problem well-known. According to the same topics this variant may work and kind people from Google can see and give a break to the developer.Very sadly, that this problem lasts through years and is still relevant in 2020. I'm ready to pay hundreds of dollars per year, and not 25 once, if in hour of need there will be an alive person to help me, but not this useless AI.
    Update: 6 hours after this post my account was unblocked. I thank everyone who supported me. And thank the person who did this. I hope someday Google will expand the support staff and these problems will not have to be solved by reddit.

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

    Jetpack Compose dev10 release is available

    Posted: 29 Apr 2020 10:57 AM PDT

    Minimum SDK version

    Posted: 30 Apr 2020 12:11 AM PDT

    I know this must be a, somewhat, common question, but I cant find good information on it.

    I've developed a couple of apps, both for personal use as for some friends, this to say I have some understanding and a bit of experience developing apps. But every time I start a new app I always face myself with choosing the minimum SDK version and I never have much confidence in the option I choose.

    I've looked at Google's Version Distribution dashboard, it's good to have an idea of the percentages of devices using each version.

    But my question is, which SDK version is a good compromise between a good coverage and good performance/features?

    Hope someone can enlighten me. Thanks

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

    Huge Admob CPM drop (>50%)

    Posted: 30 Apr 2020 02:28 AM PDT

    Hello,

    from last month I was experiencing a huge CPM drop (over 50%) in my android games.

    I was wondering if this is just me or you also experience this due to COVID situation.

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

    [CodeSwap] I'll help code your android app if you help code mine.

    Posted: 30 Apr 2020 01:59 AM PDT

    I was working on my android apps when it occurred to me that I think collaborating on another person's project (and vice versa) is actually a great way to learn.

    If you have an android app you need help coding and in return you'd also be open to helping me with one of my android apps, I'd love to collaborate. Leave a comment with your background and android app in the comments below and maybe we can even get multiple collaborators all working together.

    Cheers, Ed

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

    Question about running functions in the background.

    Posted: 29 Apr 2020 07:46 PM PDT

    Hi everyone I have a question.

    basically I have an ionic app that I need to be running in the background when it is being minimised. I have since managed this but I realised that the processes are a lot slower. (I have used a cordova plugin to allow background processes. There is a notification to inform the user the app is still running in the background.)

    When the app is in the foreground, I used setInterval to run api calls and what not every 4 seconds. Currently if the app is in the background, the app actually only succeeeds in the process every half minute or so.

    So my question is.... is there like a limitation on the background processes that are running when the app is being minimised. And is there a way to fully run the app as though it is in the foreground?

    My system information:

    Cordova CLI: 6.5.0

    Ionic Framework Version: 2.0.0-beta.4

    Ionic CLI Version: 2.0.0-beta.30

    Ionic App Lib Version: 2.0.0-beta.16

    OS:

    Node Version: v4.4.7

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

    How can i use adb to stream fake webcam?

    Posted: 30 Apr 2020 01:04 AM PDT

    I would really appreciate if you could point me into the right direction.

    I want to use my Mobile as a fake webcam where I can play pre-recorded video via USB, seems like interesting thing to do to flunk classes.

    Where I plug my mobile into PC via USB and use it.

    I know app like Droid Cam can turn you mobile into a webcam.

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

    Anchored FAB + modal bottom sheet?

    Posted: 29 Apr 2020 08:37 PM PDT

    My app currently has an FAB anchored to a bottom sheet, something like this https://medium.com/android-bits/android-anchoring-views-to-bottom-sheet-9c9069caf7d4

    The designers want to change the bottom sheet to a modal bottom sheet, meaning a translucent scrim is placed over the rest of the screen, and tapping on it would dismiss the bottom sheet (e.g. Modal Bottom Sheet in https://www.androidhive.info/2017/12/android-working-with-bottom-sheet/)

    However I can't seem to find a way to preserve the FAB behavior when doing so - is it even possible since the modal bottom sheet is technically a dialog?

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

    GitHub - Library that shows most recent Firebase analytics event for easy checking

    Posted: 29 Apr 2020 11:48 PM PDT

    Reveal and hide a view inside an onScrolled listener

    Posted: 29 Apr 2020 11:21 PM PDT

    I have a ConstraintLayout with 3 views in the container activity. a recycler view in a fragment. when the user swaps down. I want to hide this layout and when swaps up I want to show it. I tried this code here. by implementing a listener. sending updates from fragment to Activity.
    but when I swap the whole screen is shaking. Is it because I'm checking perpetually!

    recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
    u/Override
    public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
    super.onScrolled(recyclerView, dx, dy);
    if (dy > 0) {
    floatingActionButton.setVisibility(View.VISIBLE);
    listener.onDownScroll(true);
    } else {
    floatingActionButton.setVisibility(View.GONE);
    listener.onDownScroll(false);
    }
    }
    });

    back in the container activity :
    u/Override
    public void onDownScroll(boolean isDown) {
    if (isDown) {
    constraintLayout.setVisibility(View.GONE);
    } else {
    constraintLayout.setVisibility(View.VISIBLE);
    }
    }

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

    App Suspended on Google Play due to 'Sensitive Events Policy' - What Now?

    Posted: 29 Apr 2020 10:47 AM PDT

    My casual trivia game was suspended due to Google's Sensitive Events policy. They provided no details of the violation, just a generic description of the policy:

    We don't allow apps that lack reasonable sensitivity towards or capitalize on a natural disaster, atrocity, conflict, death, or other tragic event.

    I don't know what to do next. I think the suspension may be from a joke about COVID-19 in the app description, 'Guaranteed to distract you from coronavirus for at least a few minutes!' but I'm not sure.

    Google will let me upload a new version of the app 'minus the offending content', but I'm not 100% sure that was actually the violation. I don't want to risk uploading another version and having my account banned entirely.

    I have submitted an appeal, but feel stuck in limbo right now.

    What's the best way to handle this?

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

    Will doing Android TV development hinder my career progression?

    Posted: 29 Apr 2020 02:24 PM PDT

    I've done mobile for a couple years now. Have an opportunity to join tv development. I'm not really sure how different it is though technically. Would it be hard to switch back to mobile down the line?

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

    Implementing motion with Material Design | Google Design Tutorials

    Posted: 29 Apr 2020 12:17 PM PDT

    How do I link LiveData, ViewModel, polling and observer pattern together with the MVVM model?

    Posted: 29 Apr 2020 10:17 PM PDT

    Hi, I'm completely new to android dev here and I'm learning it on my own. I have a few questions about using the MVVM model. I'll give a summary of what I want my app to do first:

    I am currently coding an app that fetches data from a remote server and displays it in the UI. I would like to poll the server every N seconds and update my view (fragments) accordingly. There are shared data between the fragments.

    Currently I have 4 packages (model which holds the data, repository which fetches data from the server, ViewModel, View which have the fragments & activities). The View classes call ViewModel to get data (in LiveData) and ViewModel call Repo classes to get the data (in LiveData). At the moment, my code crashes with ```Network on Main Exception``` but I know that I have to handle this with AsyncTask which leads to my next question, since AsyncTask is deprecated what other alternatives do I have that can poll the server and prevent the exception.

    tldr; Need help with polling the server and displaying data in UI from remote server.

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

    Routing Gennymotion through VPN connection

    Posted: 29 Apr 2020 09:57 PM PDT

    Hello, I'm a noob learning android development and apps. I'm running latest Gennymotion Desktop on Linux Mint 19.3 Cinnamon. When I connect to ProtonVPN the virtual device does not run. It start booting forever. Is there a way to rout the Gennymotion and VIrtualBox through ProtonVPN. I tried changing the connection from NAT to Bridge but it didn't work. I'm new to networking stuff so please bear with me. Only way Gennymotion works If I turn off VPN. But my use case is to run through VPN.

    Any suggestions is appreciated. Thanks.

    submitted by /u/49Head
    [link] [comments]

    Use Espresso’s IdlingResource for max Android test speed

    Posted: 29 Apr 2020 10:36 AM PDT

    How to write good applications in Android?

    Posted: 29 Apr 2020 05:31 PM PDT

    I want to know resources where I can learn to create apps that are well coded, maintainable, and readable. How to make something that works well and is efficient. I know it's a very general question but tutorials are either very basic and cut corners on things that wouldn't work on actual apps, or are very specific and only talk about one component or feature.

    As someone who's new, it's very frustrating to not know what the good way of doing something is.

    Any ideas? I need some insight into what to search for. I saw the Android Architecture Basic Sample code and there's honestly too many things there which I do not know which makes it hard to understand.

    Let me give you a toy example.

    • There's a group of Zoos and each one has its own animals. Each animal can be of a type, like mammal, reptile, etc.

    • My very simple app is static: the list of zoos and animals is fixed and no cloud or database is needed to retrieve them.

    • There should be a main activity which shows all the animals of the Zoo you're located in. Here you can choose between the animal types as well if you wish.

    • There should be another activity which let's you manually change some things, including the zoo you want to see.

    So the questions are:

    • Where would the dataset be saved? I assume there should be decoupling between UI and state.

    • How would the main activity get the data?

    • When we change the Zoo, how would the main activity be notified that the list should show another set of animals?

    I could go on and on, but I think these three are good

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

    The Good, The Bad and The Ugly — Three approaches to loading contacts in your Android application

    Posted: 29 Apr 2020 05:45 AM PDT

    Add multiple viewtype in recyclerview with Epoxy

    Posted: 29 Apr 2020 08:24 PM PDT

    Hi folks, I'm building an app with a user feed witch consist of a recyclerview with multiple viewtype (posts) with Airbnb's Epoxy. I actually got the initial feed with only one viewtype (only text post).

    Now how can I make Epoxy to show different viewtype ?

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

    zzrb.zza resulting in a divide by zero arithmetic exception for every other cameraX analyzer.analyze frame

    Posted: 29 Apr 2020 08:09 PM PDT

    So I am getting back on a project that I haven't touched in months. I was messing around with it a few days ago with no issue (at least after my most recent post before this). For whatever reason today though, I went to run it and i've been wrestling this issue for a few hours now...

    Problem:

    I am creating a FIrebaseVisionImage object to use for various ml vision tasks.

    FirebaseVisionImage image = FirebaseVisionImage.fromMediaImage(mediaImage, rotation); 

    Pretty standard setup before that (similar to what they have in their example using CameraX with ImageAnalysis.Analyzer. For whatever reason I am now getting this error that I wasn't getting before.

    java.lang.ArithmeticException: divide by zero at com.google.android.gms.internal.firebase_ml.zzrb.zza(com.google.firebase:firebase-ml-vision@@24.0.0:55) at com.google.android.gms.internal.firebase_ml.zzrb.zza(com.google.firebase:firebase-ml-vision@@24.0.0:48) at com.google.firebase.ml.vision.common.FirebaseVisionImage.fromMediaImage(com.google.firebase:firebase-ml-vision@@24.0.0:20) at com.divertinc.visiondispositiontesting.MainActivity$4.analyze(MainActivity.java:248) 

    What i've done so far:

    Okay well not a problem, let me just stack trace that. I see that this line:

    int var9 = var2 / var8; 

    Is the issue. Okay cool so let's figure out those values.

    Let's work backwards:

    1. When I call fromMediaImage FirebaseVisionImage it's supposed to return this (based on my image):return new FirebaseVisionImage(zzrb.zza(var2, var0.getWidth(), var0.getHeight()), (new Builder()).setFormat(17).setWidth(var0.getWidth()).setHeight(var0.getHeight()).setRotation(var1).build())
    2. K cool, so we know the method at question here is: zza(Plane[] var0, int var1, int var2)
    3. K then the line that follows (as far as the error is concerned) is: zza(var0[0], var1, var2, var4, 0, 1);
    4. Which is then calling: zza(Plane var0, int var1, int var2, byte[] var3, int var4, int var5)
    5. Which finally calls: int var9 = var2 / var8

    Now, i'm an Android Studio newbie so I can't figure out how to get values in class files when tracing so I just went back to where I was creating the FirebaseVisionImage and right before that I did this:

    Image.Plane var0 = mediaImage.getPlanes()[0]; ByteBuffer var6 = var0.getBuffer(); int var2 = mediaImage.getHeight(); int var8 = (var6.remaining() + var0.getRowStride() - 1) / var0.getRowStride(); Log.d("divide debug: ", String.valueOf(var2)); Log.d("divide debug: ", String.valueOf(var8)); Log.d("divide debug: ", String.valueOf(var6.remaining())); Log.d("divide debug: ", String.valueOf(var0.getRowStride())); Log.d("divide debug: ", String.valueOf((var6.remaining() + var0.getRowStride() - 1))); 

    This resulted in:

    480

    0

    0

    640

    639

    K well 639/640 is 0.9....

    Now if I remember how Java works, int division rounds down - unless explicitly overridden I assume?

    Anyway. K I guess that makes complete sense then.

    Okay so if I remember correctly, the only thing I changed between now and when it was working was dependency upgrades which I actually downgraded down for to see if that would affect it which it shouldn't have anyway after looking at release notes.

    EDIT: So I found that ACTUALLY when I log what I did earlier, I notice that 4 frames are being analyzed before with the following results:

    Log 1:

    480

    480

    307200

    640

    307839

    Log 2:

    480

    0

    0

    640

    639

    Log 3:

    480

    480

    307200

    640

    307839

    CRASH MESSAGE

    Log 4:

    480

    0

    0

    640

    639

    Where i'm stuck :(

    The error is happening less than a 100th of a millisecond after the third log and nearly 300 milliseconds after that, the 4th log is hit.

    So my assumption is that there is something wrong with buffering every other frame since .remaining() method results in 0 for every other frame which shouldn't be happening. Unfortunately I know very little about that so I wanted to see if anyone could point me in the right direction D:

    On the upside, i've learned a ton throughout the process of posting this (i've been working on this post for about 45 minutes)

    Below is my whole camera functionality which I assume has a hell of a lot of issues as is D:

    private void startCamera() { //make sure there isn't another camera instance running before starting CameraX.unbindAll(); /* start preview */ int aspRatioW = txView.getWidth(); //get width of screen int aspRatioH = txView.getHeight(); //get height Rational asp = new Rational (aspRatioW, aspRatioH); //aspect ratio Size screen = new Size(aspRatioW, aspRatioH); //size of the screen //config obj for preview/viewfinder thingy. PreviewConfig pConfig = new PreviewConfig.Builder().setTargetResolution(screen).build(); Preview preview = new Preview(pConfig); //lets build it preview.setOnPreviewOutputUpdateListener( new Preview.OnPreviewOutputUpdateListener() { //to update the surface texture we have to destroy it first, then re-add it @Override public void onUpdated(Preview.PreviewOutput output){ ViewGroup parent = (ViewGroup) txView.getParent(); parent.removeView(txView); parent.addView(txView, 0); txView.setSurfaceTexture(output.getSurfaceTexture()); updateTransform(); } }); /* image capture */ .setTargetRotation(getWindowManager().getDefaultDisplay().getRotation()).build(); final ImageCapture imgCap = new ImageCapture(imgCapConfig); findViewById(R.id.imgCapture).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d("image taken", "image taken"); } }); /* image analyser */ ImageAnalysisConfig imgAConfig = new ImageAnalysisConfig.Builder().setImageReaderMode(ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build(); ImageAnalysis analysis = new ImageAnalysis(imgAConfig); analysis.setAnalyzer( Executors.newSingleThreadExecutor(), new ImageAnalysis.Analyzer(){ @Override public void analyze(ImageProxy imageProxy, int degrees){ while (weCanAnalyzeFrame) { if (!isMachineLearning) { Log.d("analyze", "just analyzing"); if (imageProxy == null || imageProxy.getImage() == null) { Log.d("imageProxy: ", "is null"); return; } Image mediaImage = imageProxy.getImage(); int rotation = degreesToFirebaseRotation(degrees); Log.d("degrees: ", String.valueOf(degrees)); Log.d("rotation: ", String.valueOf(rotation)); Image.Plane var0 = mediaImage.getPlanes()[0]; ByteBuffer var6 = var0.getBuffer(); int var2 = mediaImage.getHeight(); int var8 = (var6.remaining() + var0.getRowStride() - 1) / var0.getRowStride(); // int var9 = var2 / var8; Log.d("divide debug: ", String.valueOf(var2)); Log.d("divide debug: ", String.valueOf(var8)); Log.d("divide debug: ", String.valueOf(var6.remaining())); Log.d("divide debug: ", String.valueOf(var0.getRowStride())); Log.d("divide debug: ", String.valueOf((var6.remaining() + var0.getRowStride() - 1))); Log.d("divide debug: ", " "); FirebaseVisionImage image = FirebaseVisionImage.fromMediaImage(mediaImage, rotation); Log.d("analyze", "isMachineLearning is about to be true"); isMachineLearning = true; extractBarcode(image, image.getBitmap()); } } } }); //bind to lifecycle: CameraX.bindToLifecycle(this, analysis, imgCap, preview); } 
    submitted by /u/divjbobo
    [link] [comments]

    Is there a camera plugin for snapchat

    Posted: 29 Apr 2020 07:39 PM PDT

    So I'm not a programmer but snap chat screenshots what your camera sees but I'm wondering if there's a way around it so it can use the actual camera

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

    No comments:

    Post a Comment