• Breaking News

    Wednesday, January 12, 2022

    Android Dev - Weekly Questions Thread - January 11, 2022

    Android Dev - Weekly Questions Thread - January 11, 2022


    Weekly Questions Thread - January 11, 2022

    Posted: 11 Jan 2022 06:00 AM PST

    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]

    Update on ModernStorage

    Posted: 12 Jan 2022 08:11 AM PST

    Hi everyone 👋
    A few months ago, someone posted a thread on a library I've been working named ModernStorage. For the ones who haven't heard about it before, it's a library aiming to simplify storage interactions on Android. I've been working a lot on it with my colleague u/nic0lette, and after gathering some feedback and trying some experiments, I'm happy to share some updates about it.

    Initially, we started with two separate packages: mediastore for MediaStore interactions and filesystem for Storage Access Framework interactions. The first one was a simplified wrapper around MediaStore API while the second was implementing java.nio.File.FileSystem (API here). The main blocker for us was the requirement on API 26+ for java.nio. We tried to look for possibilities to bring it on older devices, but it was a dead end.

    While looking for alternative paths, u/nic0lette pinged me on an experimental filesystem API in Okio 3.x when it was in alpha that got my attention. I had the chance to chat with Jesse Wilson who is one the maintainer of Okio and he explained me in depth the spirit of the library and I was sold on!

    Fast-forward to today, I've deprecated the mediatore and filesystem packages and created new ones that work on API 21+ with the release 1.0.0-alpha03:

    • permissions to check storage permissions and soon to request them
    • storage to interact with files using the Okio filesystem API, which lets you read and write content of a file only using its URI, whether it's a MediaStore or a DocumentProvider (SAF) one, but also get metadata and folder file listing (Note: some methods aren't implemented yet)

    I wrote a sample app highlighting some use cases and I'm looking to create other packages to answer other storage-related needs.

    Now I need your help 🙏. The library is still experimental, but I want to shape it based on your feedback to make sure it's ready for the next version of Android, which will ease your migration with announced changes (like the Photo Picker. There are many features I want to implement, but I'm unsure how developers feel about them, please add your comment there 👈

    Thanks 🙏

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

    Kotlin vs React Native vs Flutter

    Posted: 12 Jan 2022 01:03 AM PST

    I currently work as a web dev for a start-up. I work with a lot of html,css, ssms. I primarily work with developing websites and maybe deploying it.

    I started looking up android dev and from what I understand so far flutter is google backed framework to make multiplatform apps, where as Kotlin is for android only.

    Which one would you recommend to start learning android development?

    Which one should I learn? Also I have heard that before learning any of those, I should look into react-native as it is also supported on mobile platforms. Is it true?

    tl;dr: wants to know opinion on the three languages(Kotlin,Flutter,React Native) and which language will make me a better programmer in the long time run.

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

    It's happened again. My 3-year-old game has been suspended by Google.

    Posted: 12 Jan 2022 10:25 AM PST

    Hi All,

    Here another sad story, about how Google suspended my 3-year-old game. For me it's all looks like a fight with competitors where Google just destroy indie developers.

    https://medium.com/@petersokolov_10050/google-maybe-stop-being-evil-my-3-year-old-game-has-been-suspended-3652610e4425

    I share my story and my reasoning about it is in the hope that someone in Google who is authorized to make decisions will read this and it will somehow affect on situations like mine. Think about the fact that you are just breaking other people's destinies and branding independent developers as thieves. But not everyone is like that! I'm not a thief! Just separate the cases of using someone brands and real competition! It's NOT the same! And it's sad that you punish equally, both for theft and for competition!

    submitted by /u/Peter-Warlock
    [link] [comments]

    Do vendors like Samsung allow for larger system font and display size?

    Posted: 12 Jan 2022 06:10 AM PST

    I have been testing my app using vanilla Android on an emulator. I have set the system font and display size to the largest value, and have noticed that Screenshots from Samsung users show even larger system display settings.

    Is it common for Android system font and display size max values to be larger on different vendors spins of Android?

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

    So Frustrated with Google Play Team

    Posted: 12 Jan 2022 09:32 AM PST

    So Frustrated with Google Play Team

    Hey everyone,

    I created the following thread more than a month ago, where basically Google Play team completely ignores any request for additional information and state a ridiculous reason for rejecting the app to the Android TV program.

    After more then a month of my initial submit for additional information, I got a reply which was basically a copy/paste of the initial automatic "feedback" of my app rejection, you can see the response I got in the following pictures:

    The initial response I got

    My response to the mail I received

    The final response I got

    What do you mean you can't comment on my app compliance? what is the point of "support"?

    Since then, I tried submitting my app again and again, asking for additional information but without any success.

    I find it absurd that I have to spend 2-3 months to publish an app to the Android TV program, especially where the app it fit all the standards required by Google. Claiming my app depends on physical "Menu" button on your remote where there is a huge button called "Menu" on screen all the time, where you can navigate with your remote DPAD to, is beyond ridiculous and absurd, it's an insult.

    Guys, I have really lost all hope, I have been messaged by multiple users with the same issue with the Android TV program and without any solution. Does anyone here have any kind of ideas of what I can do? or even better, a contact within Google Play team that can check the subject?

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

    Here's a Quick Way to Determine Price of Your App (Regional Pricing Case Study)

    Posted: 12 Jan 2022 09:18 AM PST

    In this article, we will look at a regional pricing case study of popular top-selling apps and you will also learn:

    • What is regional pricing
    • How charging less can create problems
    • Regional pricing of popular apps (Case Study)
    • A quick way to determine the price of your app

    Let's get into it!

    https://medium.com/augeo/heres-a-quick-way-to-determine-price-of-your-app-regional-pricing-case-study-eb50f1664d71

    What do you think about regional pricing?

    Do you think it is fair for people in Spain to pay almost $17 for FL Studio Mobile? Compared to only $3.16 for people in Brazil.

    submitted by /u/Story-Line
    [link] [comments]

    Font licensing - Help needed

    Posted: 12 Jan 2022 08:32 AM PST

    I'm a relatively new developer with an app that's done quite well. I've recently received an email from a font company requesting to see my license for fonts that I thought were open licenses or included in android- I know I'm completely ignorant and I should have checked. How painful is this going to be for commercial licenses and what options do I have? They have sent me records of all the versions of my app that contain said fonts and I'm worried that even if I change fonts they'll send me a copyright lawsuit.

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

    Play store can't install the update of my app for some users

    Posted: 12 Jan 2022 03:27 AM PST

    The Play Store is throwing errors "This app can't be installed" to some of my users.

    The issue seems to be related to the Play Store itself but even when the users follow the troubleshooting steps from here: https://support.google.com/googleplay/answer/7513003?hl=en it doesn't help.

    What can I do or what can I advise them to do ? Some users already gave us 1-star review for that...

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

    Play points from testing subscriptions?

    Posted: 12 Jan 2022 10:26 AM PST

    So our company's app utilizes subscriptions for IAPs. I've added my account to the play console as a tester. Whenever I use my "test card" to purchase subscriptions, I get play points. I've now accumulated thousands upon thousands of play points while testing our app.

    Do I need to be worried about this? I'm concerned Google may close my account due to fraud. I've never redeemed any of the play points in fear of this, but it also means I can't use the points I've earned legitimately.

    Has anyone else run into this? Is Google aware that this happens?

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

    Beyond Translation: What You Need To Know About Game Localization

    Posted: 12 Jan 2022 06:28 AM PST

    When it comes to game localization, there are a lot of myths out there. The truth is, you need to know a lot more than what language a certain line of text is in. You also have to know how that line of text is perceived in the target market.

    Treating game localization as just a matter of language can lead to some big mistakes. For example, many developers skip QA in the target language altogether, assuming that the game has already been tested in the source language. This leads to poor quality titles and frustrated players.

    Game localization is definitely more than just translation. The two are often confused, but they are actually very different processes. Game localization requirements are complicated because there are many unique aspects to take into consideration.

    The language of games and the best practices for translation in a given target market will vary from industry to industry, even across different languages. You need to work with experienced game translators and localizers to build an effective game localization strategy for your title.

    I compiled this checklist to help you get started:

    1. Set the Stage for Success

    Game translation and localization involve many moving parts. Before starting the project, you must establish an effective localization management process to address all the components and ensure that you have the right tools and resources.

    1. Internationalize Your Game

    Before localizing your game, go through the internationalization (i18n) process to make the code independent of elements that need to be translated and localized. These include currency, numbers, date, time, etc., which have different formatting conventions for various locales.

    1. Build Flexibility Into the UI Design

    If you're translating your game into a right-to-left (LTR) language such as Arabic and Hebrew, make sure your design can accommodate changes in text direction. Meanwhile, Asian languages with complex characters (e.g., Chinese) tend to be shorter in length but may need to be displayed in a larger font size to be legible.

    1. Provide Translators With Contextual Information

    In-context translation can help you better connect with the target audience by using references, phrases, and concepts that resonate with them. You should provide as much background information as possible to the translation team to help them preserve the original intent of the storyline.

    1. Get Your Strings Together

    Add detailed descriptions to string files to help translators accurately communicate the meaning of the original text. For example, does "watch" mean to observe something or a timekeeping device? Does "kick" refer to attacking an enemy or ejecting a player from a multiplayer game?

    To sum up, game localization is a substantial undertaking. You need to manage the internal workflows efficiently and understand the nuances of the local market. It's crucial that you work closely with your localization partner on every step of your project to ensure that your game is a global smash hit.

    Game localization isn't just about translating text. It's about ensuring that the full experience of your game is delivered to all players in their native language, from the user interface (UI) to in-game assets and beyond. Just because you've created a compelling story and stunning graphics doesn't mean that a game will resonate with people around the world if its UI is difficult to navigate or if it contains references to cultural icons that don't resonate outside of its original territory.

    I hope you find this information helpful. If you want to read more on the subject you can check this article.

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

    Would love to develop an app....

    Posted: 12 Jan 2022 09:56 AM PST

    Hi everyone! I'm currently trying to get into coding and developing. I am a photographer and I have a ton of photography that I would like to develop into a wallpaper app.

    I've searched over the internet. I found some websites that would create the app for you with a monthly fee or a one-time fee... I've looked on YouTube and saw numerous developers sometimes in other languages walking through how to create different types of apps...

    Just curious if there was anyone that could offer me any advice or go to place for a beginner like myself...

    I started looking into developing an admin panel for hosting my pictures and literally hit a dead end in terms of confidence in the direction I was going...

    Thank you all in advance

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

    Resolution websites show 432*984 px but my screen res is 2460*1080 and it looks fine. Whats happening?

    Posted: 12 Jan 2022 05:53 AM PST

    Nubia Red Magic 6 Razer Kishi issue

    Posted: 12 Jan 2022 09:33 AM PST

    Ok this has plagued me for months and I don't know what to do

    I updated my Nubia red magic 6 to Android 11. Soon as I did my Razer Kishi controller stopped working properly. Now apparently this was an issue for other phones. The work around had you turn off the accessibility options in your phone and by doing so, usb controllers would work again. Apparently that doesn't work for my phone. The other option is to update to Android 12 but there isn't an update for NRM6s. So now I'm at my wit's end. What can I do to get my controller working again?

    Thank you.

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

    Saving multipart image coming from android to Django ImageField

    Posted: 12 Jan 2022 05:02 AM PST

    I get this JSON format after sending an image in MultipartBody.Part format from Android app to Django server, Dose anyone knows how to save this to ImageField in Django?

    {'answer_image_file': {'headers': {'namesAndValues': ['Content-Disposition', 'form-data; name="answer_image"; filename="signature-question.png"']}}, 'question_id': '9974ac18-2efd-4220-bf4b-523bdd4981af'} 

    in Android I did

    @POST(SUBMIT_FORM) suspend fun submitFormBodyAPI( @Header("Authorization") token: String, @Body questionAnswer: QuestionAnswer, ): Response<FormResponse> 

    where QuestionAnswer looks like this:

    data class QuestionAnswer( val question_id: String, val answer_image_file: MultipartBody.Part? = null, ) 

    Edit: When trying to save to Django image field I got this error:

    AttributeError: 'dict' object has no attribute '_committed' 

    NOTE: I need to send it like that because it will solve my problem posted here with all details and code: Android Retrofit upload images and text in the same request

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

    Debug tools with VR android headset

    Posted: 12 Jan 2022 04:49 AM PST

    Hi fellow developers, I'm a very lazy developer and I'm working on a VR android app, I would like to know what tools would you use to stay as lazy as possible when you try your apk on your vr device.

    Edit: I'm using Unity3D

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

    Would an ANDROID developed app in webview cache media automatically?

    Posted: 12 Jan 2022 08:24 AM PST

    TLDR: I hope someone may know about how android apps cache media in WebView. Specifically, I am wondering about fire tv apps.

    I am trying to build an app that allows a business to play promotional videos on tv in the waiting room via a custom android firetv app. The app would just immediately open an iframe/webview of a url which plays the videos. On this URL it would simply just play html5 video and images on a loop.

    My main question is this - in some cases the playlists are 3gb+, if the app "downloads" each video every time it plays, it could lead to very high data usage for the person playing the media and obviously very slow play. Are android apps smart enough to "cache" the media it sees in webview if it has the space?

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

    Popup Menu vs Spinner

    Posted: 12 Jan 2022 07:54 AM PST

    When do i use either? they look so similar in functionality im actually confused between the. are they interchangeable?

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

    How to develop part of an android app?

    Posted: 12 Jan 2022 07:54 AM PST

    We're about to implement a new functionality into some existig large apps of banks and other service providers. Logically, they can't share their whole repo with us, so we need to figure out a way to add a few screens somehow. My current ideas are to

    1. Implement the functionality with web tech, and let them include the inside a WebView (All of our current ui is web based, so this is also convinient).
    2. Start a new project where we mimic the main menu and implement our part in this temporary app.

    What would you guys do?

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

    Android Developers Backstage: Episode 181: Architecture → Fewer bugs at the end

    Posted: 11 Jan 2022 02:55 PM PST

    Google Play Store Policy Warnings

    Posted: 12 Jan 2022 01:09 AM PST

    I receive the following email from Google Play:

    Issue: Need login credentials for app review In order for us to review your app for compliance with Developer Program Policies, we will need you to provide valid login credentials for your app. If users need credentials to access your app, please provide all appropriate credentials via Play Console. If you previously supplied credentials, please ensure that they have not expired. If your app normally uses 2-Step Verification (e.g. SMS verification), biometrics (e.g. a fingerprint or face scan) or a location-dependent password (e.g. geo-gate), please provide valid demo credentials that we can use instead. {If in-app content can't be accessed after entering login credentials}We could not access in-app content due to app connection error. {If login credentials are provided in non-English language}Please provide all appropriate credentials in English via Play Console.

    My app is still published and hasn't been removed yet. However, I was told that if I do not address the issue, my app will be removed from Google Play.

    It has been more than 24 hours since I addressed the issue. I provided valid login credentials via App Access section and the change was Reviewed and Approved. However, the Policy Warning is still being shown in the Policy Status section of Google Play Console. I even created a new release using the last APK that was uploaded. This too has been reviewed and approved yet the Policy Warning still says that it needs to be fixed.

    I am worried that my app might still get removed even though I already corrected the issue. Has anyone experienced this before? If so, how long did it take before the Policy Warning was cleared after you provided the fix?

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

    Are ads worth it on mobile apps

    Posted: 11 Jan 2022 07:48 PM PST

    I've done some research and most topics only talk about mobile games when bringing up ads, saying that rewarding video ads are the best, however my applications are no games, and don't have anything to give to use rewarding ads. Say for example a news app or a todo list.

    I've thought about using banner ads and interstitial ads but those make the application look cheap to me especially the banner ads and I personally never click those so they barely make any revenue. If I should use ads, which kind of ad shall it be?

    submitted by /u/five-eleven
    [link] [comments]

    Background mobile data restriction.

    Posted: 12 Jan 2022 02:13 AM PST

    Does the google play store have any policy regarding the VPN app (the local VPN server) to block certain apps (user selected)? Or are there any things to consider to develop such an app (google play store policy-wise)? I know currently, there are lots of such app in the play store, just want to verify that its future proof.

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

    Reading sms-messages, still possible in newest Android versions?

    Posted: 12 Jan 2022 01:58 AM PST

    Found this https://stackoverflow.com/questions/848728/how-can-i-read-sms-messages-from-the-device-programmatically-in-android and I'd like to know if this is still possible in newest Android versions through all manufacturers?

    Cheers!

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

    Include store's reviews within website

    Posted: 12 Jan 2022 01:48 AM PST

    Within my website, I want to highlight some reviews we received on our app on the Play Store.

    Technically no problem. But is it legal? Do we have to remove the names?

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

    Controlling five Android phones with PC

    Posted: 11 Jan 2022 03:40 PM PST

    Hello, I'm looking to use five android phones to take a photo simultaneously (from different angles).

    I'd like to control the phones via a pc (linux or mac) and ideally they're all connected via USB/Ethernet.

    I'm an EE, but I don't have much Android experience, so looking to get some feedback based on what I've read so far.

    1. Looks like the Scrcpy library could work here, controlling the 5 devices via adb. I see it allows for multiple connections, have anyone tried this?

    2. I could potentially create a PCB that integrates with the headphone jack of each device and control via push button and 470ohm resistor?

    3. I could potentially build a client app on the Android devices, which connects to a server app on linux/mac (basic TCP/IP client server)

    What routes/design would people take on architect-ing such a system?

    Thanks for your help and reading this.

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

    No comments:

    Post a Comment