• Breaking News

    [Android][timeline][#f39c12]

    Friday, February 28, 2020

    Weekly "anything goes" thread! Android Dev

    Weekly "anything goes" thread! Android Dev


    Weekly "anything goes" thread!

    Posted: 28 Feb 2020 04:40 AM PST

    Here's your chance to talk about whatever!

    Although if you're thinking about getting feedback on an app, you should wait until tomorrow's App Feedback thread.

    Remember that while you can talk about any topic, being a jerk is still not allowed.

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

    Moment kills its Android camera app, cites constantly-changing software and hardware

    Posted: 28 Feb 2020 01:49 PM PST

    Android Studio 3.6.1 available

    Posted: 28 Feb 2020 10:56 AM PST

    Transform into a different view or activity using morphing animations.

    Posted: 28 Feb 2020 08:10 AM PST

    JakeWharton/wormhole

    Posted: 27 Feb 2020 08:42 PM PST

    Using Unity as a Subview in an Android Activity

    Posted: 28 Feb 2020 01:58 PM PST

    Does anyone with Unity experience know of a solution to this? I can't seem to find any recent ones or answers that aren't outdated.

    https://stackoverflow.com/questions/43918417/display-unity-scene-as-sub-view-in-android-studio

    https://gamedev.stackexchange.com/questions/134347/android-black-screen-with-unity-app-in-subview

    https://stackoverflow.com/questions/31041031/black-screen-unity-subview-in-android

    All the answers I've tried is giving me a blackscreen. Someone suggested that it could be a unity issue because they reworked the whole Android-Integration in version 2019.3.0.

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

    Emulator 30.0.2 Canary, HAXM 7.5.6 and AMD Hypervisor 1.4 to stable

    Posted: 28 Feb 2020 10:26 AM PST

    I just received an offer to post fake positive reviews for my app; where should I report it?

    Posted: 28 Feb 2020 08:09 AM PST

    Text of the email I received:

    I will provide u many good reviews with 5 star rating and download app in low price plz msg me my whatsapp no. … bcz I have above 400 members review makers whatsapp group plz call me or share your whatsapp no. I will msg you.. .. !!

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

    Values change back to their defaults after I change them

    Posted: 28 Feb 2020 03:45 PM PST

    I need some help with updating a URL. So I am using OpenTDB for my API for a homework project. I have my onClick Listener grab values from a spinner and convert them to the values the API will like, like General Knowledge is 9. The onClick works but after I leave the onCreate it goes back to the original value and I can't get the new value to stay. Any ideas? I am out of ideas. I've tried to move the value to another class and grabbing it from there, putting the URL into the strings file, tried the two different ways to make an onClickListener. None have worked.

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

    What has happened with apk sizes and zip alignment since Android Studio 3.6?

    Posted: 28 Feb 2020 06:11 AM PST

    Since I updated to Android Studio 3.6 two things has happened to my release APK:

    - It has grown from 60mb to 102mb

    - zipalign.exe does not successfully alignment to 4 which means I cannot upload the APK

    - My app uses native libraries, and using verbose output from zipalign it seems the .so files are the files which isn't successfully zipaligned.

    However, when I inspect the APK from Android Studio, it says that the downloaded size is still 60mb.

    It seems something in the release management has changed, but I cannot find any info on what has changed.

    1. Does anyone know what has changed?
    2. Should I perform some action?

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

    Make Android Studio debugger more powerful with custom Data Views

    Posted: 28 Feb 2020 04:21 AM PST

    A video lesson about a little known but very powerful feature of Android Studio (and Intellij) debugger: custom data views:

    https://caster.io/lessons/make-android-studio-debugger-more-powerful-with-custom-data-views

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

    What can you make with Java/Kotlin that cant be made with Flutter?

    Posted: 28 Feb 2020 03:24 PM PST

    How to add RecyclerView inside RecyclerView with Categories and SubCategories using Kotlin

    Posted: 28 Feb 2020 03:16 PM PST

    Fake 1 star reviews

    Posted: 28 Feb 2020 07:07 AM PST

    Someone is giving my app fake 1 star reviews and they are from the same phone and on the same day.

    is there some way I can report it to Google so that Google can remove them?

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

    Can android studio autocomplete MaterialButton attributes into Button in xml?

    Posted: 28 Feb 2020 09:57 AM PST

    Lately I had upgrade material components dependency from 1.0 to 1.1 and change app theme base to materialComponents.

    That unfortunately broke almost all my buttons cause xml Button is not translated to MaterialButton "under the hood". MaterialButton ignores background attribute and has inset.

    To the point. I design my layouts in xml. Because Button is MaterialButton is it possible to android studio to autocomplete attributes for MaterialButton then like android:insetTop/bot etc and like app:cornerRadius?

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

    Terminal commands via APP that run-as shell user (id:2000)

    Posted: 28 Feb 2020 01:36 PM PST

    I need to build an app that runs an ADB for command I usually use to do cool things. Basically on this device the ports are blocked altogether on a Samsung including: Recovery, Download Mode, Normal Mode and Safe Mode.

    Since I can not get ADB to do what I need to do, I want to write a small app with proper permissions that will either give me a shell to send the commands through and hopefully get some active intents to go through, or at least have pre-programmed commands to be sent through with enough permissions to use pm-clear/pm unininstall/pm disable, etc.

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

    Multiple resource folders in Android

    Posted: 28 Feb 2020 12:45 PM PST

    Make an overlay View

    Posted: 28 Feb 2020 07:53 AM PST

    So, Imagine a simple activity with a fragment container (matchparent) with GoogleMaps that extends from SupportMapsFragment, I want to make that when the activity goes to background the fragments overlay the user can navigate with any problem on the android UI. It will be similar to go from Full Screen Window to a Mid Screen Window or something like that... I am looking the window alerts but I don't know if I can put a fragment inside of it.

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

    Kotlin DSL for building drwables, menus, etc

    Posted: 28 Feb 2020 10:51 AM PST

    Make sure you add mediation to your apps, THEY can flip the switch on your account!

    Posted: 28 Feb 2020 04:35 AM PST

    Make sure you add mediation to your apps, THEY can flip the switch on your account!

    Mediation saved me when they flipped the switch on my account which made my CPC drop to $0.05-$0.06 from $0.2-$0.3 (almost 60% app users are from USA).

    12th October is the exact date some bot flipped the switch on my account, no suspension, no warnings, invalid activity cuts never went above 5%, fill rate always 90%+ but revenue dropped like crazy (They still give me 95%+ fill rate so ads aren't limited) .

    Those numbers are tiny, so you should probably zoom.

    Here are my before and after pics.

    Sept 2019

    October 2019

    Immediately after this happened, I switched off Admob through MoPub, and gave complete traffic to FAN. Do you know FAN provides real human support and that they reply to you within 5-6 hours of you sending them an email? And just in case you're wondering, the revenue never picked up on Admob and there's nobody I can email/contact.

    Use mediation, stay safe.

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

    Need help.

    Posted: 28 Feb 2020 10:17 AM PST

    Need help.

    So i've been following this tutorial. https://developer.android.com/training/basics/firstapp/starting-activity#kotlin It says " Return to the activity_main.xml file to call the method from the button:

    1. Select the button in the Layout Editor.
    2. In the Attributes window, locate the onClick property and select sendMessage [MainActivity] from its drop-down list."

    There's a dropdown list, but it only has 1 blank option. I'm using kotlin. I just updated to the latest version of AS, but I had this problem on the version before as well. Password for key is Password. Key alias is key0. Using jar signing (the first option) I don't know to link a file, but I can provide the apk. Edit 2: Changed photo

    https://preview.redd.it/p5wbkxbmeqj41.png?width=1919&format=png&auto=webp&s=52a48f3c2d931fb571b94ec9139675780855ca36

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

    How to assure data download when app gets update in appstore

    Posted: 28 Feb 2020 06:46 AM PST

    My question is, I have to update an app that's on the appstore when they download the update will all the data also be downloaded automatically or not, my app is a calendar with events and a recyclerView with the events and the update is to update the calendar range from last year to this year (2019/01/01 - 2020/01/30) => (2020/01/01 - 2021/01/30) but doing this also means I need to download the calendar events again.

    My download function is in the MainActivity.java and it downloads a json from online.

    I have a property class where I set a property called firstTime where it checks if this is true then it downloads the data, but if it's false then it doesn't so if this person already has the app then this property would be sent to false and the download won't happen.

    I have this method which is very relevant, currently even if I uninstall the app off my phone and run it again in androidStudio and it installs it again, System.out.println(properties.getFirstTime()); returns false

    private void checkStatus_Download() { System.out.println(properties.getFirstTime()); if (properties.getFirstTime()) { if (Connectivity.hasConnectivity(this, true)) { downloadJSON(); System.out.println("did download"); properties.setFirstTime(false); } else { System.out.println("not online"); setRecyclerView(); } } else { System.out.println("first time false"); } } 

    Is there a way to force this download when the person updates the app?

    This is the section of code that changes in this update, the widget in this case is this dependency

    widget.state().edit() .setMinimumDate(CalendarDay.from(2020, 1, 1)) .setMaximumDate(CalendarDay.from(2021, 1, 31)) .commit(); 
    submitted by /u/msslgomez
    [link] [comments]

    Using onPreviewFrame To run ML models

    Posted: 28 Feb 2020 05:58 AM PST

    So i'm using the legacy Camera API (as far as I can tell) to get previewFrame call backs to then run a few machine learning models I have. I have confirmed that the machine learning models work when given a bitmap decoded when I take a picture via the onPictureTaken callback. Right now in the samples below, I am just simply testing on ML Kit's barcode scanner as a base case, but my custom models seemed to work fine with the onPictureTaken callback as well.

    From what i've gathered, using onPreviewFrame isn't necessarily the best way to do this, but for the sake of having a quick sample play-around (and learning experience) I decided to just go this route. Based on everything i've tried from others having solutions online, I can't seem to get anything to work properly. The below code returns null:

    @Override public void onPreviewFrame(byte[] data, Camera camera) { // Log.d("onPreviewFrame bytes.length", String.valueOf(bytes.length)); // final Bitmap bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); // Log.d("onPreviewFrame bmp.getHeight()", String.valueOf(bmp.getHeight())); Camera.Parameters parameters = camera.getParameters(); int width = parameters.getPreviewSize().width; int height = parameters.getPreviewSize().height; Log.d("onPreviewFrame - width", String.valueOf(width)); Log.d("onPreviewFrame - height", String.valueOf(height)); Log.d("onPreviewFrame - parameters.getPreviewFormat()", String.valueOf(parameters.getPreviewFormat())); YuvImage yuv = new YuvImage(data, parameters.getPreviewFormat(), width, height, null); ByteArrayOutputStream out = new ByteArrayOutputStream(); yuv.compressToJpeg(new Rect(0, 0, width, height), 100, out); // // byte[] bytes = out.toByteArray(); // final Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); byte[] bytes = yuv.getYuvData(); final Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); extractBarcode(FirebaseVisionImage.fromBitmap(bitmap), bitmap); } 

    Here's something else I tried:

    @Override public void onPreviewFrame(byte[] data, Camera camera) { // Log.d("onPreviewFrame bytes.length", String.valueOf(bytes.length)); // final Bitmap bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); // Log.d("onPreviewFrame bmp.getHeight()", String.valueOf(bmp.getHeight())); Camera.Parameters parameters = camera.getParameters(); int width = parameters.getPreviewSize().width; int height = parameters.getPreviewSize().height; Log.d("onPreviewFrame - width", String.valueOf(width)); Log.d("onPreviewFrame - height", String.valueOf(height)); YuvImage yuv = new YuvImage(data, parameters.getPreviewFormat(), width, height, null); ByteArrayOutputStream out = new ByteArrayOutputStream(); yuv.compressToJpeg(new Rect(0, 0, width, height), 100, out); byte[] bytes = out.toByteArray(); final Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length); extractBarcode(FirebaseVisionImage.fromBitmap(bitmap), bitmap); } 

    Unfortunately I got this error:

    ML Kit has detected that you seem to pass camera frames to the detector as a Bitmap object. This is inefficient. Please use YUV_420_888 format for camera2 API or NV21 format for (legacy) camera API and directly pass down the byte array to ML Kit.

    with parameters.getPreviewFormat() returning 17 which is NV21. I also tried simply by changing that to ImageFormat.YUV_420_888 but that resulted in the below illegal argument exception:

    only support ImageFormat.NV21 and ImageFormat.YUY2 for now

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

    Hey I wanted to Build an App for android, and I am Pritty good at Python. Should I make apps with Python or Just Go With Android Studio?

    Posted: 28 Feb 2020 09:41 AM PST

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel