Android Dev - App Feedback Thread - November 26, 2021 |
- App Feedback Thread - November 26, 2021
- Romain and Chet showed us how to start building a UI framework. There is a ton of knowledge packed in this episode
- Is it a good practice to cache AlertDialogs and AlertDialog.Builders?
- Typical use of inline functions in Android apps?
- Share your experience on handling API request errors :)
- Kaspresso 1.4.0: Jetpack Compose support (early access)
- Can this be changed?
- Is simple case of creating multiple files and giving the user an easy access to them is impossible with Stored Access Framework?
- Kotlin list transformations
- Is Google committed to AR on Android?
- Directing to web payment via a landing page
- Splash Screen API
- Samsung Locked Bootloaders
- Porting a Linux CLI program to Android. What will the process entail?
- Help to select software for app development
- Problem with jetpack paging 3.0
- The Device and Network Abuse policy, section 4.8 and 4.9 of the Developer Distribution Agreement
- Which Google Play distribution tracks can I access before review?
- Amazon app store is requiring Canadian withholding tax for US C corps?
- Do not update kotlin 1.6 on your android project, yet
- How do you charge Per project?
- how to show the dominant color of image as placeholder before the image is loaded from url?
- Good resources for Android Developers?
- Hey Android Developers, as promised, here is my first Android interview with Ben Kadel. ️ The questions categories are Android developers' lifestyle, Android Community, encouraging Junior Android Developers, and some Android technicals. Hope you like it!
- How to replace strings.xml dynamically in Android?
- Hello! I'm quite new to Android Development and I have a concern.
App Feedback Thread - November 26, 2021 Posted: 26 Nov 2021 06:00 AM PST This thread is for getting feedback on your own apps. Developers:
Commenters:
To cut down on spam, accounts who are too young or do not have enough karma to post will be removed. Please make an effort to contribute to the community before asking for feedback. As always, the mod team is only a small group of people, and we rely on the readers to help us maintain this subreddit. Please report any rule breakers. Thank you. [link] [comments] | ||
Posted: 26 Nov 2021 01:32 AM PST
| ||
Is it a good practice to cache AlertDialogs and AlertDialog.Builders? Posted: 26 Nov 2021 10:31 AM PST I was thinking whether creating new dialogs and dialog builders are actually heavy tasks to perform or not and whether caching them is going to be helpful or not because caching itself needs memory and finding the proper dialog to use later on needs iteration over cached dialogs. What do you think? [link] [comments] | ||
Typical use of inline functions in Android apps? Posted: 26 Nov 2021 02:45 PM PST Hi :) Can you share where do you use inline fun() in your projects? What is best practice to use them? Any thoughts on inline functions will be appreciated. [link] [comments] | ||
Share your experience on handling API request errors :) Posted: 26 Nov 2021 02:41 PM PST Hi Android devs! Stack: Retrofit, Okhttp, RxJava2 Imagine next: You have request to get list of cars objects, you have typical code: disposable.add(apiService .getListOfCars() .subscribe(cars -> { // Success response }, throwable -> { // Error response // Handle error // Check for error cause? }) ); Questions: 1. In your apps do you check for error type, like HttpError, IOException, etc? 2. Do you post every error in onError() to Crashlytics as logException()? (we do and thus we have many non fatal errors like "Dns.class" which means user just had no connection) 3. Do you implement smth like RxJava Error CallAdapter? 4. Any best practice on this topic? Thanks! [link] [comments] | ||
Kaspresso 1.4.0: Jetpack Compose support (early access) Posted: 26 Nov 2021 03:28 AM PST Kaspresso now officially supports Jetpack Compose (early access)! Protection from flakiness, waiting for elements to appear, logging, convenient DSL, etc. Everything as you like =) Your test may look like below: ```kotlin class ComposeSimpleFlakyTest : TestCase( kaspressoBuilder = Kaspresso.Builder.withComposeSupport() ) { } ``` Read additional information here. [link] [comments] | ||
Posted: 26 Nov 2021 08:37 AM PST
| ||
Posted: 26 Nov 2021 07:25 AM PST This is kind of an open question and a pretty long one. First a quick TL;DR:
I want to able to: * create multiple files in a directory of my or user's choice * "pre-selecting" one of those files for user, by storing its uri/path and displaying its name and/or path to user * have file's location easily accesible to user, by either: - showing him meaningful path to currently selected file - showing only file's name, but showing file's location immediately, when user tries to select another file (done with use of Intent with ACTION_OPEN_DOCUMENT action and DocumentsContract.EXTRA_INITIAL_URI extra) * preferably use Intent with ACTION_OPEN_DOCUMENT_TREE for selecting those files, to have system default's DocumentsProvider (file browser) be used, instead of implementing some custom file browser.
For whatever reason I am unable to find a solution fulfilling all above requirements. Full description
In my app in one of the settings, user has an option to provide custom configuration file instead of using default settings. To make things easier, a few example configuration files are created when he chooses this option for the first time and one of them is selected as a default. At this moment user should see on the settings screen which file is selected and should be able to easily find it in phone's storage, in case he wants to "play" with it. User is also able to select another file to be used in app (done by Intent with ACTION_OPEN_DOCUMENT action).
For some reason, this pretty simple scenario seems to be almost impossible to achieve with SAF or generally on apps targeting Android 11+. Why? First let's list requirements of above scenario: 1. App has to create multiple files at once. 2. User should be able to easily navigate to the generated files location on his own, so he needs to know where are they stored. 3. App's behavior shouldn't depend on whether currently selected file was selected by the user, or was selected by default when files were created - it should display similar info and show similar location, when choosing to select another file.
I tried multiple approaches and each of them either has a major drawback or simply is unable to fulfill one of above points. Below I list all of them:
First problematic approach - creating files with use of ContentResolver
This solution for creating multiple files in Android 11+ I found on StackOverflow.
It seems to be nice and clean, allowing as to create files in system directories like Documents. Sounds good. What is the problem? This creation method returns Uri in format of: content://media/external/file/123 We can get file's name from this Uri, but not its location. I hoped at least when selecting a new file user could be first shown location of the currently selected one (this way learning its location) with use of DocumentsContract.EXTRA_INITIAL_URI for ACTION_OPEN_DOCUMENT action Intent, but unfortunately it is not working for Uri generated this way. So 3) is not satisfied.
Sum up: Problem with finding the custom files by the user.
Second problematic approach - creating files in getExternalFilesDir() directory
Method Context.getExternalFilesDir() returns path to our app's folder, in which we can create files directly without problems and any permissions.
Problems: 1. Path to app's directory is long and difficult to read. Uri's path for a file (Uri.fromFile(file) ) created there would look like below: /storage/emulated/0/Android/data/my.app.package.name.is.long/files/customFile.txt Even with /storage/emulated/0/ part somehow removed, we are left with long and incoveniant path. Also user has to find our folder among tens of other apps' folders.
Sum up: I feel it might be confusing for less tech savvy users.
Third problematic approach - let user choose folder in which files are create, using Intent.ACTION_OPEN_DOCUMENT_TREE
It is a nice approach, because we get Uri to a directory in which we will be able to create all the files we need and Uri's to those files will allow for usage of DocumentsContract.EXTRA_INITIAL_URI when selecting new custom file. Meaning, the user will have easy way of locating currently selected file (including the default one selected in beginning) and we won't have to deal with all different kind of paths, just showing file's name without a path.
Problem: When using Intent.ACTION_OPEN_DOCUMENT_TREE, user is shown information that the app will have full access to all files currently stored in selected location, which might be scary. Especially, that when using this Intent the DocumentsProvider will usually open in phone's main directory... It would be better to provide some starting folder at this point, like Documents/MyAppName, but it requires Uri to pass to Intent using DocumentsContract.EXTRA_INITIAL_URI and I don't see a way of getting such Uri for a newly created folder.
Sum up: might scare the user away. Also requires couple extra actions from user, like creating new folder, clicking through "On the next screen choose location in which custom files will be generated" information, etc., etc.
Not suitable approach - using Intent with ACTION_CREATE_DOCUMENT action to create custom files
That would be perfect solution, but it allows creation of a single file at a time, in effect requiring multiple "save as" processes for multiple custom files.
I spent larger part of this week working on this problem, searching for different approaches, workarounds, dirty hacks and I couldn't find anything. Anyone experienced similar problem and/or knows solution for it? [link] [comments] | ||
Posted: 26 Nov 2021 01:17 PM PST I'm building a chat platform, where I'm reading my list of messages from Local Room DB (ChatModel). I need to add date separators between these messages. I've to use multiple view holders and thus created a sealed class for differentiating items I require to convert the list with date separate items in between 2 models of the list, I'm not proficient with Collection functions in kotlin and confused between map/flatmap etc. [link] [comments] | ||
Is Google committed to AR on Android? Posted: 26 Nov 2021 01:06 PM PST I'm an iOS developer trying to understand Android's version of AR and I'm a bit puzzled. With AR you have sensing - ARCore/ARKit and rendering - ?/RealityKit (AR specific rendering). Android's version of SceneKit (general rendering) seems to have been Sceneform which they have deprecated without providing a replacement and are telling users to use OpenGL or Unity. Have Google lost interest in AR or are they working on something? [link] [comments] | ||
Directing to web payment via a landing page Posted: 26 Nov 2021 12:14 AM PST Our mobile app also has its Windows and Mac version. So, in order to promote the cross-platform feature we created a web payment system that allows access on mobile & desktop simultaneously upon purchase. We created an explanatory landing page on the website, which also contains a CTA button directing to the web payment. If I send a push notification of the link to that landing page, is it against the policy? Would I be in trouble? [link] [comments] | ||
Posted: 26 Nov 2021 10:13 AM PST With the new API do we need to use the new method and keep our old existing one for backwards compatibility? [link] [comments] | ||
Posted: 26 Nov 2021 10:06 AM PST Hello I am fairly new to all this but I am curious why Samsung locks its bootloaders on the newer snapdragon models? Have they given a reason for this change after the s9? Why is it only in the USA and Canada? (Is it because of privacy or security laws present or not present in these regions?) I did some quick google searches and and the issue seems to have been ignored outside and development environments. From what I had noticed samsung got alot of bussiness from developers tweaking their phones not to mention the ethical component of ownership after purchase. Is Samsung's decision to lock bootloaders a testament to the value of individual's data over the value that the development community brought forth? (samsungs data collection fiscally outweighs the development market when it comes to sales?) [link] [comments] | ||
Porting a Linux CLI program to Android. What will the process entail? Posted: 26 Nov 2021 09:41 AM PST There was an app in Linux called MIDIComp, it allowed me to convert MIDI files into readable text. I'd like to port over MIDIComp to be able to used by an Android app. What needs to happen to make this a possibility? Thanks guys [link] [comments] | ||
Help to select software for app development Posted: 26 Nov 2021 06:24 AM PST Hello all, I want to develop an app for personal use but have little experience in programming, only know Matlab and some Python. Can you guys help me select an appropriate program to start in? The app will be mainly about inputting questions and answers that then later can be used to learn a language. For example, input a list of words with translation which you can then practice. You can only go to the next word if you get the right answer. I see there are a lot of no-code/minimal code programs but I have no idea where to start. I am willing to pay around 10 euros a month after a free trial. Thank you in advance. [link] [comments] | ||
Problem with jetpack paging 3.0 Posted: 25 Nov 2021 04:45 PM PST Have you guys encountered this kind of weird bug? Where RemoteMediator requests the same page over and over again despite that you reached the end of the page you're currently on [link] [comments] | ||
The Device and Network Abuse policy, section 4.8 and 4.9 of the Developer Distribution Agreement Posted: 26 Nov 2021 05:12 AM PST Hi guys, The Play Store has recently introduced a new item in it's policies:https://support.google.com/googleplay/android-developer/answer/9888379#zippy=%2Cexamples-of-common-violations Stating as an example:"Game cheating apps that affect the gameplay of other apps." I find this not very clear in how the gameplay is affected or what "affect the gameplay" of other apps means. For example,
In my opinion 2. sounds legit while the other don't directly "affect the gameplay" of other apps. What do you think ? [link] [comments] | ||
Which Google Play distribution tracks can I access before review? Posted: 26 Nov 2021 02:46 AM PST Hey folks, Right now our app is unreviewed and distributed through Internal Testing. We would like to continue using this for ourselves (people in the team). However, we would like to open up a new Closed Testing track (Alpha) and only accept users who are in a defined list. My question is: given that our app hasn't been reviewed by Google yet, will we have access to the Closed Testing feature? What else is blocked, besides production? Also, I'm not familiar with the review process. What does it take for an app to be rejected? Can we submit for review when the app is still missing plenty of features? Thanks! [link] [comments] | ||
Amazon app store is requiring Canadian withholding tax for US C corps? Posted: 26 Nov 2021 02:20 AM PST With the new Canadian tax interview that Amazon app store is making developers take, it seems a US C Corporation with no physical presence Canada is subject to a 25% withholding tax in Canada? Am I reading this correctly? Is it because amazon app store is only paying in 'Royalties' type earnings? Is there any way to get around this, because this means that we'll need to file Canadian corporate tax returns to get back the withholding tax? [link] [comments] | ||
Do not update kotlin 1.6 on your android project, yet Posted: 25 Nov 2021 12:53 AM PST
| ||
How do you charge Per project? Posted: 25 Nov 2021 05:59 AM PST We do occasionally development for Other businesses. When we do, we have our criteria that we use to reach at pricing:
In other words we charge 10% as our profit margin per project. We feel this formula is inadequate and would like to learn how you guys charge client, especially for projects that will take at least a month. The projects mostly involves writing APIs, Admin UI and Android app. [link] [comments] | ||
how to show the dominant color of image as placeholder before the image is loaded from url? Posted: 25 Nov 2021 11:25 AM PST Pinterest and Myntra are a few example and I want to achieve the same effect in my app, I'm using Picasso to load image from url and I don't know how can I get the dominant color of image that hasn't loaded yet. [link] [comments] | ||
Good resources for Android Developers? Posted: 25 Nov 2021 04:05 AM PST I've been a Native Android Developer for almost 2 years now and I consider myself more than just a junior developer, but the problem is that I find myself following old practices rather than using advanced and more newer ones. I wanted to know if there's a place where I can get an idea of newer things like Compose, Jetpack, RxJava etc with actual use cases rather than just tutorials. [link] [comments] | ||
Posted: 24 Nov 2021 11:44 PM PST
| ||
How to replace strings.xml dynamically in Android? Posted: 24 Nov 2021 11:36 PM PST Hi, Connections!In one of our Android projects, we were required to utilize a centralized data store, which contained the English & Spanish translations of various string resources. I am glad to share that I have documented my findings in the form of a blog! [link] [comments] | ||
Hello! I'm quite new to Android Development and I have a concern. Posted: 24 Nov 2021 10:59 PM PST If I were to create a database using Room and insert data into that database, when I share the project with my group mates they wouldn't have access to the database (since that's stored locally on my device if I'm not wrong). Is there a way for them to have access to the same data and database without having to run the insert statements again every time? [link] [comments] |
You are subscribed to email updates from Developing Android Apps. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment