Android Dev - A couple of questions regarding Clean + MVVM (big project rewrite) |
- A couple of questions regarding Clean + MVVM (big project rewrite)
- Super Simple Bouncy RecyclerView in Kotlin
- Kotlin typealias: use alternate names for class or functions types without introducing a new type
- Concat XML strings at build time
- Using Google drive api on F-Droid app?
- Room: "top star projection"
- Android Single Source of Truth (SSOT) with MVVM and LiveData
- Suggestion to how to centralize the write and read on file System
- Asking if this is possible to do with maps api?
- Jetpack compose: "Ability to draw debug layout bounds" merged
- How do you Test your Android apps mostly Android bases classes like Activity,Fragment with Robolectric or Mockito/JUnit ?
- Any sources for working with Tensorflow Lite on Android Studio ?
- Writing tests for Android
- Dependency Injection in a library project
- Videoview doubt
- MVVM combined with AAC is not so simple. At least for me. Here's why.
- How do you start off with making an app?
- Need advice on testing
- Capturing the internal audio stream of device
- Is there anyone from Spain with experience in Virtual POS (card payments) integration? Advice needed.
- Looking for partner(s) for Kotlin portfolio project
- What do you recommend for live cloud testing?
- [Question] Over Modularization Examples and Benchmarks
A couple of questions regarding Clean + MVVM (big project rewrite) Posted: 21 Jan 2020 12:56 AM PST I'm planning to rewrite my app into a new architecture to make it scalable and testable. Currently, the majority of the code is in views and different manager classes because it's a 5+ year-old project and it's simply becoming too much to handle. It works well and the code is manageable, but this is a project that should last another 5+ years, so I need to make some decisions about scalability. I've read as much info about Clean + MVVM as I possibly could and even though I still don't feel like I understand it completely, I gave it a try and wanted to start rewriting it. I ran into some issues almost immediately. Now I need to decide between blindly following Clean architecture, come up with my own architecture which works best for our project, or make some sacrifices which will go against the main Clean principles. Here are the main points I want to discuss:
[link] [comments] | ||
Super Simple Bouncy RecyclerView in Kotlin Posted: 21 Jan 2020 03:40 AM PST https://github.com/IainS1986/SimpleBouncyRecyclerView To be honest, I did this project mainly to learn around producing Android aar libraries and how to share them (via Bintray -> JCenter), but thought some folks might be interested in seeing what I did. I'm a professional Xamarin developer by day but shifting to native development on the side. I did this in Xamarin originally so ported it over as a test. Its called "Simple" really because I 100% know there are much better solutions out there that are probably much safer (especially with regards to animating cells on add/remove - that might not work while over-scrolling :/ ). This is also completely *not* physics based, its just faked via animation and a simple dampening function on drag. But, some people might be interested in the code and the approach I took regardless. [link] [comments] | ||
Kotlin typealias: use alternate names for class or functions types without introducing a new type Posted: 20 Jan 2020 05:24 PM PST
| ||
Concat XML strings at build time Posted: 21 Jan 2020 02:02 AM PST | ||
Using Google drive api on F-Droid app? Posted: 20 Jan 2020 09:29 PM PST I have created an app "Notes Sync". The app is open source on github. Many users have asked me to make the app available on F-Droid. I looked through the rules and found that google services isn't supported on F-Droid apps. My app uses Google OAuth and Google Drive API for saving notes and images to the user's Google Drive storage. So is it okay to submit my app to F-Droid? If not is there an alternative to the Google Drive API? [link] [comments] | ||
Posted: 21 Jan 2020 04:38 AM PST Does anyone know what does the word "top" mean in context of "top star projection"? I've found it here: https://developer.android.com/jetpack/androidx/releases/room#compiler-options
More details about Expanding Projections are here: https://developer.android.com/jetpack/androidx/releases/room#2.2.0
but they don't mention word "top". Do you have any clue? [link] [comments] | ||
Android Single Source of Truth (SSOT) with MVVM and LiveData Posted: 21 Jan 2020 02:18 AM PST
| ||
Suggestion to how to centralize the write and read on file System Posted: 21 Jan 2020 08:02 AM PST Hi :) In all my app activities I have to read and write in specific folders on fileSystem. To centralize the access I have created an helper class 'FileSystemHelper' with different static method like: the problem is that I have to pass to all this methods the app context. I have thought to and the solution is to use a sort of a repository pattern, trasform this 'FileSystemHelper' class from static to a simple non-static class , add a costructor with a appContext parameter and at this point create a singleton factory FileSystemManager that return new instance of FileSystemHelper class, maybe with lazy instantiation. What do you think about it ? In what way do you resolve this centralization problem in your android app ? :) [link] [comments] | ||
Asking if this is possible to do with maps api? Posted: 21 Jan 2020 03:15 AM PST So i'm thinking of tracking all the device which are in a certain route that i set on maps.If i start navigation from A to B i want the data of all devices which are currently in it.So is these any api that i can feed the latlang of the devices and the route to check if they are in the route? [link] [comments] | ||
Jetpack compose: "Ability to draw debug layout bounds" merged Posted: 21 Jan 2020 02:25 AM PST I occasionally lurk around the AOSP Compose repo and this merged commit caught my attention. It adds the ability to draw debug layout bounds for Jetpack Compose components. Why is this needed? Well, as of today, most of the tooling around view debugging works with Views, as in it works with But Jetpack Compose components are not necessarily Views. I mean, it is entirely possible that your entire screen is one This commit seems to be a first step towards providing such tooling. This seems to be implemented in the Compose runtime. This is probably good enough for Android Studio tools. I'm not entirely sure how it will work with Developer Options though. After all, Developer Options cannot be back-ported. If I had to guess, I'd say that probably you would need a specific version of Android to use Developer Options with Jetpack Compose. Or, who knows, maybe Google can backport such functionality by using internal API's that are out of bounds (no pun intended) for us. [link] [comments] | ||
Posted: 20 Jan 2020 12:42 PM PST | ||
Any sources for working with Tensorflow Lite on Android Studio ? Posted: 20 Jan 2020 08:11 PM PST Hey guys a newbie here. Recently I've been engaged in a project where I have to classify Bluetooth Signals though a machine learning model. A SVM classifier to be exact. And the python model is done but I got no clue how to run the model in Android and I failed to find a goos resource. Any ideas or good sources ? [link] [comments] | ||
Posted: 20 Jan 2020 04:37 PM PST Simple question. I have learnt writing tests for my apps at the school of 'learning by doing'. Which means I write them wrong many times. I am looking for a more formal lesson on writing tests in Android. Can someone point me to the right place, please? [link] [comments] | ||
Dependency Injection in a library project Posted: 20 Jan 2020 11:40 PM PST I've been tasked with creating a few libraries that will be used by Android devs within the organisation. One of these libraries is a wrapper for AppAuth with some extra functionality. I wish to know how to have a DI framework within these libraries without the need for the consumer of the library to have that framework as well. For example with Koin, the app using the library would have to perform `startKoin { ... } ` in their Application class in order to use it. Would it be the same if I used Dagger? I'm not too experienced with developing libraries and I don't wish for the library setup to be too cumbersome for the user but at the same time I need DI within the libraries. [link] [comments] | ||
Posted: 21 Jan 2020 03:17 AM PST I have two different videoview playing at the same time now. So right now i have two different media controller that pops up depending on which videoview is in focus. I want to combine these two video controllers into one so two separate controllers doesn't pop up. [link] [comments] | ||
MVVM combined with AAC is not so simple. At least for me. Here's why. Posted: 20 Jan 2020 07:36 PM PST One day I decided to avoid using Activities. Being skeptical about it. I liked the idea of Single Activity apps. But, it is a pretty difficult path. I tried to follow the concepts of MVVM, but when I decided to use only fragments, I understood that it is not so simple. I think using Fragments requires you to write good code. One of the main reasons for this is that Fragments cannot be in a stopped state like Activities. It means, if you have some code in your Fragment like My first attempt was to avoid having code like By doing this, I achieved I was keeping to learn about the MVVM architectural pattern. One day, I knew that it is not a good idea to have IO scope in ViewModel, which is the Presentation layer. I don't know a lot about Clean architecture, but it was strange for me to have IO scope in ViewModel, which should be light and not so big. So, I decided to move the opening IO scope in my repository, which always makes IO operations. Here is how my Repository changed: Almost nothing changed, only scope opening moved to the repository. Here is how my ViewModel changed: It seemed pretty good code. Here, I avoided using Once there appeared some task where I should do some modification over my news list. It doesn't matter which kind of modification, it can be a simple mapping operation or validation stuff. And this task has ruined my code. I didn't know how to handle it. Where to do this kind of modification? In Repository or ViewModel? Suppose, the answer is Repository. But Repository, in my case, returns Suppose, the answer is ViewModel. But modification operations could be a pretty difficult operation to be executed in the main thread. Of course, I can open the IO scope in my ViewModel, but it completely ruins the argument that ViewModel should not know anything about IO stuff. I might be wrong, but opening coroutine scopes has its costs, even if they are pretty light. So, at that point, I understood that I don't know anything about MVVM. I don't know anything about how to use AAC efficiently. I looked at the Sunflower code of Google that was made using best practices, but it didn't give me some hints. They store LiveData's inside repository and store LiveData's inside ViewModel. LiveData's are duplicated. It didn't answer my questions. Most samples do not show how to properly handle errors or do modifications over data when MVVM combined with AAC is used. Maybe, I should learn about Clean architecture. I understand that a developer should handle all that stuff and come up with some good solutions. Google provides us with amazing tools and it is your responsibility how to use it. But, I tried it and failed. If you have some ideas about the problems above, please share. [link] [comments] | ||
How do you start off with making an app? Posted: 21 Jan 2020 01:30 AM PST Hi! this is a dumb question but where do i start off with creating an app and publishing it in google play? i have an idea of making an uber-esque app but have no idea how to start. suggestions like what application to use for programming would be appreciated [link] [comments] | ||
Posted: 20 Jan 2020 10:53 PM PST Hi, I have recently joined a new company and there are no unit tests written (I have never written UT). I am thinking about introducing unit tests into the app but right now am very confused about where to begin. I am not even sure if the architecture is testable or not. So I need a little advice about how to begin or even tell me if the architecture is testable or not. We follow the following architecture: ActivityA wants to fetch list of data from api, display it on the screeen. (No caching/persistance needed). ActivityA: we use AAC viewmodel and liveData (repo is constructor injected using vmfactory) ViewModelA: Now, in repository, we make api call using volley. Repository: Any leads on how to begin testing/ how to make this more testable would be greatly appreciated. [link] [comments] | ||
Capturing the internal audio stream of device Posted: 20 Jan 2020 06:50 PM PST Say if the phone is playing music from Google play (or youtube), does anyone know if there is a way to capture this audio data to stream to other devices? So far, I have found the following classes, but am unsure if these are the way to go. The first one looks more oriented towards microphone capture. The second one actually gives you data related to audio, but its main purpose is for visualization. https://developer.android.com/reference/android/media/MediaRecorder https://developer.android.com/reference/android/media/audiofx/Visualizer In addition, has anyone streamed audio data before? So far, I have created a test app using the Any help would be really appreciated, thanks! [link] [comments] | ||
Posted: 20 Jan 2020 09:33 AM PST What I need is way to offer users a way to buy physical goods through the app. Stripe and alike can't be used, so the question is about integrating sort of Virtual POS with Redsys, BBVA, Sabadel etc. Have anyone successfully integrated something of that kind? Would be very grateful for the advice. [link] [comments] | ||
Looking for partner(s) for Kotlin portfolio project Posted: 20 Jan 2020 11:47 AM PST I'm an aspiring android dev and I've made a couple apps in the SDK using java. In order to get hired I think that I'll need to also be able to write in Kotlin so I'd like to make make a medium-sized app for portfolio purposes. Would anyone else be interested in joining me on this? It's always better to have another person to bounce ideas off of. I'm flexible with the type of app that's made since its characteristics are inherently not the purpose of this activity anyways. Also, I intend to incorporate some libraries that I frequently see posted in job requirements i.e. Dagger2, RxJava/Kotlin [link] [comments] | ||
What do you recommend for live cloud testing? Posted: 20 Jan 2020 01:34 PM PST I have a popular Android piano app, and sometimes have users with devices like a Galaxy Note 10 that have a issue with the audio latency or hiccups. Since some of those devices are around 800 EUR or so, I can't just buy them and test them, although I used to do that for older ones. So I am looking for a cloud solution where I can select a device, and upload my APK and just mess around a bit to see what is the issue, if any. Most important requirement is that it support audio some way. I found bitbar, which seems quite responsive, but no audio. And not much else. Are there people who use such services and can recommend me one? (Automated test services like Firebase/Google's cloud are not useful for these kind of issues) [link] [comments] | ||
[Question] Over Modularization Examples and Benchmarks Posted: 20 Jan 2020 01:26 PM PST I have seen more and more people talking about Modularization: blog posts, talks and git projects heavily modularized from beginning! In addition to that, in previous jobs I saw projects that went from a monolith to dozens and sometimes, hundreds of modules, in few months due to "developers believing this would solve all their (build) problems" - these projects vary from 20KLOC to 1000KLOC. Ironically, after that, some projects kept having issues and to face it they... created a brand new modularization strategy... and when it didn't work properly, they blamed "Dagger" and any annotation processor without any benchmark that could really prove that... Note that "they" in this case, sometimes - but not always - includes "me". All of that said, my question is: am I exaggerating, did I have bad luck/experiences or over Modularization is a thing now? Do we have good content against modularization for everything? Like benchmarks and when it is not that good idea? Maybe some talks about that? Any information is welcome, thank you in advance! [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