• Breaking News

    Friday, March 12, 2021

    Android Dev - Weekly Anything Goes Thread - March 12, 2021

    Android Dev - Weekly Anything Goes Thread - March 12, 2021


    Weekly Anything Goes Thread - March 12, 2021

    Posted: 12 Mar 2021 06:00 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]

    RenderEffect (Android 12): Blur in Action

    Posted: 12 Mar 2021 02:55 AM PST

    App suspended on Google Play - help?

    Posted: 12 Mar 2021 06:59 AM PST

    My Flutter app com.driver.codes (https://driver.codes) was suspended last evening by Google without notice due to a malicious DMCA copyright claim that even the claimant accepts was not their intended outcome. I only became aware of the claim as they also filed through Apple, who notified me and invited me to discuss with the claimant, which I did. Regardless that I've resolved the issue with the claimant amicably and was about to publish an update to temporarily remove the feature whilst I seek legal counsel; the evidence that Google have used to pass judgement is presented back to me in an illegible format - the images forming the evidence are broken in the console where I'm invited to review such. Ordinarily I would have no means to assess the claim in order to counter it - seemingly the only way to resolve this situation.

    I now have no idea when and if the app will return. I've read some horror stories about how my case may not even get reviewed by a human.

    Is this normal? Are developers and their livelihoods balanced so precariously?

    This is a hobby app, a means for me to remain hands on with Flutter and Android. In my professional life I spend 6 figures with Google annually. Somewhat of a bitter taste right now.

    And yes, I guess I'm hoping someone at Google might read this. I'm out of ideas. Thanks.

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

    Mac menu bar app for common adb tools like connecting over TCP, capturing logcat, screenshots and opening deeplinks

    Posted: 11 Mar 2021 08:08 PM PST

    Hey all, wrote a small Mac menu bar app that includes common adb tools like connecting over TCP, take screenshots and record screen, capture logcat and opening deeplinks.

    https://github.com/naman14/adb-tools-mac

    I primarily wrote this to help our frontend team working in react to test changes in our app quickly by connecting to device over wifi. The adb executable is also included in the app internally to avoid common installation issues with adb.

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

    Android app challenge for a job interview

    Posted: 11 Mar 2021 02:50 PM PST

    https://github.com/HamdiBoumaiza/Stars

    Hello there, a while ago i had a case study challenge to do for a job interview and i had a week to do it, the result was not what i was hoping for and i did not get the job but it was a good opportunity to test my skills.

    I made some changes after the challenge submission, feel free to check it out and give me your feedback.

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

    Is Using Webviews For Some Components a Good Practice?

    Posted: 12 Mar 2021 02:06 AM PST

    Hi,

    I am fairly new to the Android Development. I am just learning all about it but thanks to my web programming background it is being really fast.

    I have a question about webviews. Using a webview is a really fun thing for me because for example, when I have a simple component (like a chart) but hard to draw with Java I am building it with HTML and CSS and using it as a webview.

    I am wondering if this is as useful as it is for me or am I missing some points?

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

    Let your delegates auto-nullify references

    Posted: 12 Mar 2021 05:01 AM PST

    Camera X, Camera 2 or something else?

    Posted: 12 Mar 2021 08:45 AM PST

    Hi android friends,

    i'm currently developing a camera app as part of my university course and am having a complete mare. i've tried using camera X, following the android documentation - it worked but the preview was very laggy and i got some random crashes. i've spent a few hours trouble shooting and scouring the internet to no avail.

    i looked into camera2 but am struggling to find any good resources on it. i've come across a few people suggesting a third party library, CameraView - https://github.com/natario1/CameraView

    so my question for y'all is, what is the industry standard way of implementing camera features? is it camera x, camera 2, or something else?

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

    What are possible tools to generate the call graph of an android application?

    Posted: 12 Mar 2021 08:36 AM PST

    Question is similar to this: profiling - Generate Call Graph in Android - Stack Overflow

    I'd like to visualize my code in android to develop better applications.

    I would like to have the call graph of the application...like which class/method is calling which..and so on

    For Kotlin/Java

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

    ConstraintLayout 2.1.0 beta 1

    Posted: 11 Mar 2021 05:04 PM PST

    (Possible) Reason why AdMob suspends fresh Android apps

    Posted: 11 Mar 2021 09:25 AM PST

    Disclaimer

    • This post is not yet another whine about a suspended app or bad Google
    • This is not a confirmed theory, just a very likely explanation
    • If you think you know where this is going, wait for the plot twist in the end

    Backstory

    Like many other devs, I had my app suspended in the AdMob for "invalid traffic concerns". After reading some Reddit posts on this topic, I learned that the AdMob is almost guaranteed to suspend fresh apps now, so it's better to not integrate the ads straight away. True or not, but there's definitely a huge number of devs suffering from the same issue, and there's absolutely no way to appeal Google's decision.

    On the day my app got suspended, I saw a weird crash in Firebase with UI Automator in the stacktrace, which was really suspicious, since I have never used it. I thought maybe it was a competitor trying to "DDoS" my app by making a script to click on ads or something like that, and I made a post to ask how to prevent that. Spoiler, isUserAMonkey didn't work.

    The fun part

    Anyway, after a month my app got un-suspended and so far everything is ok, but recently I was clicking through various reports in Google Play Dev Console and stumbled upon a couple of hilarious videos and screenshots of Google's Pre-launch report. For those who don't know, those are reports made during Google's auto-test of your app with some monkey-bots.

    For a couple of minutes I was watching how those bots were savagely clicking on my ads multiple times in a row, in multiple reports [example video]. And those weren't the test ads or test devices, because otherwise, the banner would have a [Test] marker. Coincidentally, in one of those reports, there was a similar crash to the one I got before with UI Automator in the trace.

    Now, I can't be sure that this really caused the suspension of the app, but it surely could contribute to the decision. After all, it makes sense - you have very few users, almost no real ad clicks, and there's let's say ~10 Google bots clicking 10 times each on your ads in a span of a couple of minutes. And at the end of the day, it's just a fun story in any case :)

    What can we do about it?

    So I have Native AdMob ads integrated, and the bot was clicking on the Call to Action button and the icon specifically, probably because they are clickable and resolvable by some Accessibility services, or have a content description. I'm not sure if having a regular WebView ad would help, but it's worth checking.

    isUserAMonkey doesn't detect these bots, not sure why, but I guess they use a different mechanism to run these tests.

    There's a way to customize those Pre-launch reports and provide your own scenarios, so the bot won't be clicking random stuff on the screen.

    I didn't get any answer from Google about my suspension, but if you experienced something similar, please comment and share, maybe we'll manage to bring some attention to this problem. Also, check your video reports.

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

    Command execution failure when after setting targetSdkVersion to 30 (Android 11)

    Posted: 12 Mar 2021 02:41 AM PST

    I have an Android app using the following code:

    Process proc = Runtime.getRuntime().exec("ip neigh");

    When compileSdkVersion and targetSdkVersion are 29 everything works fine and the process's exitcode is 0 (normal termination). But after setting these variables to 30 the exitcode is 1 (ubnormal termination) and results of the command can't be used.

    Seems like Android 11 release notes don't have any information about this.

    Does anyone know what is wrong?

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

    How to Publish an App to the App Store and Google Play

    Posted: 12 Mar 2021 06:16 AM PST

    Hey guys! Let's consider what is behind submitting an app to App Store and Google Play. Each platform comes with its own set of rules, regulations, and procedures that should be met. You might find it worth reading.
    https://2muchcoffee.com/blog/how-to-publish-an-app-to-the-app-store-and-google-play/

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

    Android project structure in Android view

    Posted: 12 Mar 2021 02:41 AM PST

    Is it possible to have multiple subfolders/folders for layout, drawable etc. that appear in Android view, not only Project view?

    And as an overall good practice, how should I organise a project? Should I use modules, keep everything in the same place, divide into folders/subfolders...?

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

    How to Publish an App to the App Store and Google Play

    Posted: 12 Mar 2021 06:19 AM PST

    Hey guys! Let's consider what is behind submitting an app to App Store and Google Play. Each platform comes with its own set of rules, regulations, and procedures that should be met. You might find it worth reading.
    https://2muchcoffee.com/blog/how-to-publish-an-app-to-the-app-store-and-google-play/

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

    Best place to create initialize/create Room database?

    Posted: 11 Mar 2021 04:05 PM PST

    I have a simple app where my users need to be able to store their data and retrieve it. Using Room database to do this. I have everything set up, but I am not sure where to put the AppDatabase db = Room.databaseBuilder(getApplicationContext(), AppDatabase.class, "my-database").build();

    If I put in the onCreate, the application crashes. if I declaring it above that function, in the public class MainActivity extends AppCompatActivity space, it also crashes. Where exactly is the best place to put this? The documentation does not discuss this at all. https://developer.android.com/training/data-storage/room

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

    Keeping up with deprecations?

    Posted: 11 Mar 2021 03:59 PM PST

    How do you guys learn about what exactly has been deprecated? Like right now I am refactoring a bunch of AsyncTask stuff. I didnt even know it was deprecated until like a month ago. I like keeping the app fresh ya know? That is until I say fuck it and leave it for the next guy.

    submitted by /u/Sea-Veterinarian-333
    [link] [comments]

    Is there a Google API to show an app from the Play Store on a bottom sheet?

    Posted: 11 Mar 2021 05:19 PM PST

    Is reddit android app Native or react-native?

    Posted: 11 Mar 2021 12:18 PM PST

    The app seems pretty smooth especially scrolling long lists with images, gif and different-sized list items.
    Do you guys think or know if the app is react-native?

    submitted by /u/Parking-Ad-6639
    [link] [comments]

    Deploy an App with the ability for the user to download some content from the cloud

    Posted: 11 Mar 2021 01:22 PM PST

    Hi,

    I would like to remove most of resources (images, sounds and videos) from my app, so from the APK, so the user would have to download them if he wants to access it. The best example I have in mind is Google Books. When you buy in Google Books, then you can download it the content, then you can access it locally in the application. This is exactly what I would like to do.

    I don't really know what's the best way to achieve this It would be great if I could use some Google / Firebase storage such as Google Drive to store and download data from the cloud. I started to take a look at Firebase Hosting, Storage, etc. but I don't really understand if that would help.

    I had some difficulties in finding what I'm looking for on Google and Reddit. So I apologize if I missed some obvious threads.

    Yoann

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

    How can I upload APK bigger than 100mb? (simplified)

    Posted: 11 Mar 2021 12:21 PM PST

    I've built an app using react native augmented reality app where the filters are located in the android app's assets folder but together those filters take up about 60mb or so, so when I build an APK from it, it always end up being bigger than 100mb. I've tried minifying it with proguard, getting rid of any unnecessary code and node_modules ... etc but it's just outright impossible to downsize the APK to be less than 100mb.

    What are the ways of uploading it? I've looked online and people recommended that i need to create separate the android assets in expansion files. But what even are expansion files? and how do I create them? There are no clear instructions or guidelines that explain the fundamentals nor practicals.

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

    Android Library: Create an image/screenshot of any View or Bitamp in JPG, PNG or .nomedia formats with oneliner code. Save yourself the trouble!

    Posted: 11 Mar 2021 11:57 AM PST

    No comments:

    Post a Comment