• Breaking News

    Tuesday, June 15, 2021

    Android Dev - Weekly Questions Thread - June 15, 2021

    Android Dev - Weekly Questions Thread - June 15, 2021


    Weekly Questions Thread - June 15, 2021

    Posted: 15 Jun 2021 06:00 AM PDT

    This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, our Discord, or Stack Overflow before posting). Examples of questions:

    • How do I pass data between my Activities?
    • Does anyone have a link to the source for the AOSP messaging app?
    • Is it possible to programmatically change the color of the status bar without targeting API 21?

    Large code snippets don't read well on reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

    Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

    Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click this link!

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

    Awesome Book! Someone recommend me another!

    Posted: 14 Jun 2021 01:43 PM PDT

    Ultrasonic audio beacon

    Posted: 15 Jun 2021 05:09 AM PDT

    Does the android sdk have official support for ultrasonic cross device tracking, with audio beacons and microphone recieving? I am wanting to prototype an app that has offline close proximity device recognition. It's not meant for invading privacy or profit. I genuinely have a practical use for the technology.

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

    Setting up installation source tracking for an android app

    Posted: 15 Jun 2021 12:53 AM PDT

    Hello,

    I've been trying to figure out what's exactly needed in order to track the installation sources for the app with the least amount changes.

    Currently I have an application released which collects no data from users, so I haven't integrated it with firebase or any other service to help me out with that. From the information I found online, I will have to connect it to some service in order to have these analytics, right? As soon as I do that, I will have to provide a private policy because I start collecting some kind of data from users, have I understood it correctly?

    So my plan is to integrate it with firebase to probably track UTM tags, generate a privacy policy and host it on some free hosting site and start analyzing my data. Is this the easiest way to achieve the goal of tracking installation sources?

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

    Example Jetpack Compose Application

    Posted: 15 Jun 2021 05:24 AM PDT

    Hi guys, I've been checking Jetpack Compose in the last couple of weeks and I've created a pretty basic streaming application. Check it out here: https://github.com/volkansahin45/VolkyTV
    Feedbacks are very welcome. Thanks! :)

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

    So about Google requiring me to make public my home address to sell my app for a fixed price...

    Posted: 14 Jun 2021 06:51 PM PDT

    What is the current vibe towards this nowadays (for people that are just making apps in their bedroom)? I've been trying to find up to date conversations about this topic but there aren't many, but from what I can see, over the years there have been some slight changes?

    For one, the place where you write your address is now one big field rather than actual separate address fields, so technically I don't think it will even automatically catch it if you don't enter an actual address? (I haven't tried that yet, I haven't tried anything yet lol)

    The box says "physical address", and under it says "please enter a valid postal address", but then under that it also says -

    "By providing your email or postal address information, you confirm that you consent to Google publicly displaying or disclosing that information in connection with your apps. "

    Is that Google basically saying that they wont take action against you if you enter an email address in instead? I have heard of people using email in place of physical address but assumed it would be a risky thing

    And I am aware that I can buy a mailbox, but right now I would rather not spend the money especially not knowing if my game is even going to make a dime.

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

    Screen Tracker is a library that helps you identify Activites and Fragments much easier at runtime

    Posted: 14 Jun 2021 10:06 AM PDT

    Screen Tracker is a library that helps you identify Activites and Fragments much easier at runtime

    In an emerging Compose environment, you will probably still have to mantain projects with Activities and Fragments, so if you want to keep track of your UI components easier, you can use Screen Tracker.

    https://github.com/catalinghita8/android-screen-tracker

    https://preview.redd.it/pgu2dzv5h9571.png?width=1610&format=png&auto=webp&s=cb3ebf41a661cc8bd8403296dc38ec9b263fcf24

    Motivation:

    Have you ever worked on a huge project with dozens of Activities and Fragments and kept forgetting which Activity or Fragment you should mess with?

    This has happened to me and my team so many times when working on projects that had well above 100 Activities and Fragments (mostly fragments to our defence), so I decided to implement a tracker.

    The library basically listens for changes in the Activity/Fragments stacks and displays the top most ones. The result is printed as an overlay with a ForegroundService.

    You can use it for several other purposes like passing debug builds with the library implementation to the QA teams. This way, when bugs come up, QA can attach screenshots of the issue and allow you to automatically know what Activity/Fragment you should work on next.

    Important notes:

    - The library uses the latest Kotlin version but is still very unstable therefore it can only be used on debug build types. There are quite a few improvements for it on the pipeline though.

    - The library makes no sense for small-medium projects. It was intended for big projects where you can lose sight of the components you're working on pretty easily.

    - This is the first library I develop so hopefully it's working fine. I've tested it with Fragments through the Navigation library and they seem to be detected as well.

    - Contributions are welcomed!

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

    am i the only one experiencing this? after may 19 my ANR rate on google play console doubled. plus when i want to view the anr all of them has this warning "Stack trace not available" how can i fix this if i dont know what it is? my app anr rate is now twice the "bad behaviour threshold".

    Posted: 14 Jun 2021 06:41 PM PDT

    Our Journey Towards a Testable Android App

    Posted: 15 Jun 2021 08:05 AM PDT

    Dev project help needed!

    Posted: 15 Jun 2021 07:21 AM PDT

    Hey

    So, I started learning Android Dev (using java) a few months back. And built a few small applications along the way. I thought I was confident enough and applied for a uni project which is basically building a YouTube like application for our college. i.e. different clubs/ societies can upload there videos and other students can access it. I thought I could do it.

    But, now I don't even know where to start.

    I don't know what database to use or what server to use and how will everything work.

    If anyone can guide me how to go about it??
    I am literally clueless!

    Anykind of help would be great!!

    Ps. I don't wanna make a fool of myself in front of everyone!! So, I gotta start :')

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

    Help in architecting the websocket connection in MVVM

    Posted: 15 Jun 2021 07:12 AM PDT

    I am making a map navigation app , and want to persist the websocket connection to my backend, as much as I can, so I can send location updates and also do some real time communication,

    I have decided to go with MVVM and use dagger hilt as dependency injection

    I have decided to make a repository that will handle my websocket connection, I will tag it with
    @ singleton to give it an Application scope,

    My idea is that because the repository is application wide singleton even if my app goes in the background (considering no process death) I will persist that connection

    Now that repository will be consumed in my foreground service and any fragment that needs it,

    I will send location updates to my backend via foreground service through my repository, and rest of the logic will be handled by my activity if in foreground.

    I want that my location updates to be send to the backend even if app is in background,
    will this work , and also is my assumption that only one websocket connection will be made to my backend is correct?

    also can someone help me how to close that websocket connection once my app is closed?

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

    Do headphones and headsets use Classic Bluetooth or BLE?

    Posted: 15 Jun 2021 12:13 AM PDT

    I have been trying to use the Nordic library for implementing BLE into my app and HM-10 as a peripheral. I was wondering if I could also use the HM-10 peripheral (a BLE sensor mainly used for microcontrollers) and use it to build a wireless headset using an android app as an intermediary.

    idk where else to ask this question. but im hoping someone here has worked with bluetooth and android. additionally, sources on the internet are unclear which kind of bluetooth is used for headsets. it makes sense for it to be classic bluetooth but im seeing other places are saying its BLE.

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

    Should I post my android application's source code on github?

    Posted: 14 Jun 2021 12:49 PM PDT

    A while ago I made an application because I wanted to learn Android dev and Java. I want to use the application on my resume now. I'm thinking of putting the source code of my little application on github. I have already uploaded my app on Play Store (gave myself a 5 star too!).

    Has anyone done this before? Does anyone know whether this is a good idea? Will there be any legal problems for me if I do that? Will uploading the source code get me into any trouble with google?

    Side question: Do you think posting the source code is a good idea anyway? Instead of just letting the companies I'm applying to download and check out my app?

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

    Restarting Android Studio by disabling Kotlin breaks/freeze the Android Studio. Is there any fix to undo this?

    Posted: 14 Jun 2021 11:59 PM PDT

    Restarting Android Studio by disabling Kotlin breaks/freeze the Android Studio. Is there any fix to undo this?

    My college subject course bounds me to study Android App Development with Java language. Since Android Studio is pretty heavy when comes to RAM, I decided to decrease the ram usage by turn on the power mode and by disabling the plugins which I'm never going to use. This included Kolin and a version control system like Git.

    Everything went down the hill after I tried to restart Android Studio. I will keep all other extensions disabled but I need to enable the Kotlin plugin. Is there a command through which a user can enable Kotlin plugin? Because if I try to open GUI, it will show this warning:

    Fedora 34 + Android Studio 4.2.1.0

    I don't want to reinstall Android Studio again. I have to set up everything from start. I had installed Android Studio using the Flatpak command. What other options do I have except for reinstalling Android studio?

    I looking for something like this (if exists):

    flatpak run com.google.AndroidStudio <some-argument-which-can-enable-koltin-plugin> 
    submitted by /u/Arunzeb
    [link] [comments]

    How much does a Bachelor's degree affect job hunt?

    Posted: 14 Jun 2021 11:48 PM PDT

    Does having a bachelor's degree really make a huge difference for recruiters to pick one candidate over another? (Assume this is the first job for both candidates)

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

    JPGs to video format

    Posted: 15 Jun 2021 03:21 AM PDT

    Hello, I have a series of JPGs and I want to make them into a video. I searched a lot for possible solution but most of them does not work or they are extra complicated just to stick some images together. Can someone suggest any tutorial or particular method. Code snippets are welcomed too but I would like to have some explanation along. Thanks!

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

    Did your apps on google play also magically lost a lot of ratings today?

    Posted: 14 Jun 2021 07:29 PM PDT

    How to get in contact with Google Play store to challenge an app rejection

    Posted: 14 Jun 2021 03:51 PM PDT

    Background

    Our app had a write up in SALT magazine today (https://www.saltmagazine.com.au/feature/listen-up) which is an exciting moment.
    The iOS version is being featured in the App Store later this year.
    However, the Android version has been unavailable for the past 2 weeks despite every attempt I have made to get it back in the Google Play Store.

    The app had been in the store for 8 years, but it was recently removed.
    It was initially rejected saying the background permission was not required, but we have actioned that in numerous ways - including explaining why it is needed, and eventually actually removing it, reducing the functionality of the app in an attempt to get it back in the store. We are continuously being rejected in the Google Play Store, without any coherent explanation as to why being provided. What is said is that the app doesn't need location permission, or that we need a particular message - the app clearly needs location access, and the message has been provided - making these changes doesn't seem to have any effect on the rejection at the Google Play Store end.

    I've sent this message in the most recent appeal :

    You have failed to provide any coherent feedback at all about why the request for location permission is being denied -- the pre-permission-request has been put there, in exactly the wording you requested. We have removed the location request to order the stories. We have removed the background location permission. Each of these diminishes the functionality of the app. But now I can't conceive of how this app can be rejected. Each time you send a rejection it is randomly different. I feel we must be being targeted by some disgruntled employee at Google Play.
    This is a good solid app, that has been enjoyed by many for many years. I'll send this out to the other Google departments. We do need to get this app out there again.

    Google Play is not providing any clear information, nothing that is actionable. There is no reason the app should not be in the store -- as I said, we have even complied with things that don't make sense and reduce the functionality of the Android version of the app, in an attempt to comply with what seems to be being requested.

    I don't see a pathway to reinstatement of our app via the channels made available via Google Play, those being :

    1. The permissions declaration form (https://play.google.com/console/u/0/developers/[our dev id]/app/[our app id]/app-content/permission-declarations)
    2. The permissions appeal form (https://support.google.com/googleplay/android-developer/contact/permissions)
    3. This email address (googleplay-developer-support@google.com)
    4. The google contact form (https://support.google.com/accounts)

    Context

    I know this question might look like it doesn't quite belong here.
    But this is a situation that many app developers are going to face, and there needs to be a solution.

    For iOS apps it is so easy - When Apple iTunes has a rejection of an app, they send screenshots of exactly where the problem is and identify exactly what policy has resulted in the rejection.
    It's also really really easy to talk with people at Apple - either directly via iTunes Connect interface, or else via multiple support options where you can actually talk to a person.

    Android app developers need a pathway to communicate with Google in the case of an app rejection. Please, if you have found any that work, share them here for the benefit of all app developers.

    Question(s)

    Has anyone found a way to talk directly with someone at Google Play Console?

    What other path is there when Google Play is rejecting an app without any clear, coherent, or actionable information included?

    Finally - I'm thinking about doing some kind of social media blitz type thing #BringBackSoundtrailsForAndroid
    (but I'm not much of a social media wiz). Are there any channels that Google Play senior staff are likely to listen to where it would make sense to get a few hundred people posting to in order to get their attention?

    submitted by /u/Relevant-Pudding-359
    [link] [comments]

    Can I run python in an Android app?

    Posted: 14 Jun 2021 09:39 PM PDT

    I am new to Java (and to be honest programming as a whole) and I am trying to do a very basic IOT project. I have a super simple (like 10 line) python code that I am using to pull Data from a MQTT broker (Adafruit IO) and wanted to know if it was possible to run this code in an Android application, and if so, how difficult would it be?

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

    Is there any universal thermal label printer library for Android?

    Posted: 14 Jun 2021 07:44 PM PDT

    I have purchased bluetooth thermal label printer Phomemo M110 awhile ago without properly check if SDK is provided by the company. It was my fault to assume that they do but found out it wasn't. I have tried a few random SDK from Zebra, Brother printer and a few more which I couldn't remember and none is working. Mostly when connected to the printer, it disconnect almost immediately.

    So, is there any library that will work on this printer?

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

    Do I NEED Unity to produce an android turn-based game?

    Posted: 14 Jun 2021 10:29 PM PDT

    I can reason out the logic for building a game in Android Studio using Kotlin and various drawables/buttons/listeners and databasing, etc.

    Would I run into a workload issue by exclusively using Android Studio instead of Unity? Will the game 'run' much faster if built in Unity?

    Thanks.

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

    Admob: Normal vs Rewarded Interstitial

    Posted: 14 Jun 2021 09:42 AM PDT

    Hi,

    At the moment I am testing out both. So far the Rewarded Interstitial eCPM has been worse. Does it take time to optimise? Shouldn't it be higher than normal interstitial?

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

    Nearby Places

    Posted: 14 Jun 2021 01:24 PM PDT

    I am trying to find nearby restaurants/other places near a given latitude and longitude, and output them in a list view. I have integrated the Google Maps API but integrating the Google Places API costs money. Anyone know any good alternatives that would allow the following?

    -Autocomplete search (suggestions when using search bar) -Nearby places and their information

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

    Need help building a Specialized Tablet/ MP4 player

    Posted: 14 Jun 2021 06:47 PM PDT

    First of all, I have no experience in building a Tablet/ MP4 player. I wish to build a specialized Tablet/ MP4 player which only functions are:

    - Runs 10 preinstalled games with touch screen and 10 videos (no other functions required)

    - No wifi, bluetooth etc, no keyboard etc.

    Which approach should i go considering Cost which is the main consideration, viability and work involved?

    i) Android Tablet- Just be able to play those games and videos. If i use Android, should the job be easier to just create an app including all those games and videos? Basically to just run one app for the Tablet. There is no plan for additional add ons/ download and i do not need all the other features.

    ii) MP4 player- Will I be able to customize the look such as putting those 10 games and 10 videos into the home screen? The games will run in FLASH?

    https://imgur.com/a/00muGqR

    I hope experience people can help and guide me. Thank you.

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

    No comments:

    Post a Comment