• Breaking News

    Tuesday, July 14, 2020

    Android Dev - Only 120Kb Pdf viewer For Android while most of them are about 16Mb.

    Android Dev - Only 120Kb Pdf viewer For Android while most of them are about 16Mb.


    Only 120Kb Pdf viewer For Android while most of them are about 16Mb.

    Posted: 14 Jul 2020 06:46 AM PDT

    A Rick and Morty app tutorial using Hilt, MVVM, LiveData, Kotlin Coroutines and Repository pattern :)

    Posted: 13 Jul 2020 07:15 PM PDT

    How to plan a refactor for better architecture

    Posted: 14 Jul 2020 04:38 AM PDT

    The current structure of my app is as follows:

    • One activity and multiple fragments (about 25 fragments)
    • One huge monolithic repository
    • One huge monolithic viewmodel
    • Databinding is being used but with one huge monolithic handler class
    • Navigation Component with one nav graph for the entire application

    I've been learning as I go and I now realize my architecture is very poor. I want to achieve proper MVVM and also to modularize the project. My end goal is to have an architecture that is more maintainable and testable. I'm aiming for the following:

    • Separate viewmodels for each fragment
    • Separate repositories for each entity (or roughly each data access object)
    • Separate data binding handlers for each fragment
    • The entire project split into different library modules, with each module being specific to a feature or core function

    In order to achieve the above outcome, is the following a reasonable plan?

    1. Create separate viewmodels for each fragment
    2. Create separate repositories for each entity
    3. Create separate handler classes for each fragment
    4. Divide the entire project into separate modules

    Some of the sources I've come across while researching are:

    Is the above rough plan a good one? Are there any pitfalls I should look out for?

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

    Lightweight android library for image compression

    Posted: 13 Jul 2020 02:35 PM PDT

    LiveData with Coroutines and Flow

    Posted: 14 Jul 2020 07:37 AM PDT

    Audio Streaming Apps. Benchmarking, Analytics and QA.

    Posted: 14 Jul 2020 07:09 AM PDT

    Hi all, I work at a startup which is basically an Audio streaming app (Music, Podcasts etc). We use ExoPlayer to stream audio, specifically HLS based streaming. Exoplayer works great out of the box. Recently as we scaled our app, several reviews started poping up about audio getting stuck and users experiencing a lot of stutters( buffering repeatedly). We performed several tests and found out similar issues in low network speed connections. HLS manifest and audio segments are served using CDN. we have tried a range of CDNs including AWS Cloud Front, Azure, Google cloud CDN etc. but similar reviews kept on coming. In our testing, we suspected that SSL might be the reason for failures in establishing connection to CDNs in low network scenarios and we disabled it (using http URL's now). To our surprise it did manage to reduce the reviews to half. We are still investigating this issue as this disabling SSL is just a shot in dark. I read several article from some popular streaming app's blog and couldn't find much info about how they test these kind of failures. We did solve the audio freezing issues by adding fallbacks(diff CDNs etc) in various situations( Connection related exceptions etc) but I would love to know if anyone here is using any tools or methods to proper QA these kind of issues. Also for tracking these kind of failures we are developing a Analytics collection framework around Exoplayer to keep track of streaming issues. Any suggestions related to tracking of metrics that may help in tracking these issues will be very helpful.

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

    Where to do networking code in MVVM?

    Posted: 14 Jul 2020 07:04 AM PDT

    I'm making a simple news app to try my hand at MVVM architecture. I'm confused to where I'm supposed to do the networking code. I have made separate packages for the data models, view models, and repositories. Would I put networking code in the repositories?

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

    How to Monetize Hyper-Casual Games with Success

    Posted: 14 Jul 2020 03:59 AM PDT

    ViewModels and RecyclerViewAdapter question

    Posted: 14 Jul 2020 07:58 AM PDT

    I'm getting back into Android development for this first time in a few years and am a little rusty so forgive me if this is a dumb question.

    To my understanding so far, it is bad practice to have any instances of a View object inside of a ViewModel due to potential memory leaks. If that is true, then why does the RecyclerViewAdapter hold references to View objects and why does that not cause memory leaks?

    Also, if it is best practice for the Activity or Fragment (the View) to display data coming from a ViewModel, then how does the RecyclerViewAdapter come into play? Why don't we just handle the data retrieval logic inside the ViewModel and let the View handle how it wants to display the data? Which would remove the need for a RecyclerViewAdapter all together.

    I realize that the chances of me coming in fresh and re writing best practices are non existent, so that means I'm missing something here but it's something I'm having a hard time wrapping my head around.

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

    Folders in app draw?

    Posted: 14 Jul 2020 07:38 AM PDT

    Can any one using the Android 11 beta confirm if you can add folders to the app draw in the Pixel launcher?

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

    How to do an module on Android to be embedded

    Posted: 14 Jul 2020 07:19 AM PDT

    how to make a module in android that must be embedded in another android application??

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

    Should I take the easy way, and make a governor, or go all in and create a kernel?

    Posted: 14 Jul 2020 06:35 AM PDT

    Hello! I am sick and tired of trying one kernel after the other, which provides unsatisfying performance, battery life, fod or something else! So I want to ask, what should I aim for? Just find the best kernel on every parameter beside performance, and then try to make my own governors? Or should I just go big time and try to create my own kernel?

    And also, no matter what to choose, will anyone help me achieve this? Cause I'm not exactly experienced, but ya gotta start somewhere right?

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

    How to create expandable ViewGroup like this?

    Posted: 14 Jul 2020 02:44 AM PDT

    Android assistant - MediaBrowserService - Voice command - “Play x on appName” not working

    Posted: 14 Jul 2020 01:20 AM PDT

    I'm having trouble with the Play [song] on [appName] command; specifically the "app" is not being recognised by google assistant.

    I followed the instruction form https://developer.android.com/guide/topics/media-apps/interacting-with-assistant and the demo app form https://github.com/android/uamp

    My AndroidManifest:

    <?xml version="1.0" encoding="utf-8"?>

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:tools="http://schemas.android.com/tools"

    package="com.xx">

    <uses-permission android:name="android.permission.FOREGROUND\_SERVICE" />

    <uses-permission android:name="android.permission.INTERNET" />

    <uses-permission android:name="android.permission.ACCESS\_NETWORK\_STATE" />

    <uses-permission android:name="android.permission.ACCESS\_FINE\_LOCATION" />

    <uses-permission android:name="android.permission.ACCESS\_COARSE\_LOCATION" />

    <application

    android:name=".XApplication"

    android:allowBackup="false"

    android:icon="@mipmap/ic_launcher"

    android:label="@string/app_name" // app_name = appX 101.1

    android:roundIcon="@mipmap/ic_launcher_round"

    android:supportsRtl="false"

    android:theme="@style/AppTheme">

    <activity

    android:name=".ui.splash.SplashActivity"

    android:exported="true"

    android:launchMode="singleTop"

    android:screenOrientation="portrait"

    android:theme="@style/AppTheme.AppFullScreenTheme"

    android:windowSoftInputMode="adjustPan|stateHidden">

    <intent-filter>

    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />

    </intent-filter>

    <intent-filter>

    <action android:name="android.media.action.MEDIA\_PLAY\_FROM\_SEARCH" />

    <category android:name="android.intent.category.DEFAULT" />

    </intent-filter>

    </activity>

    ...

    ...

    <service

    android:name="com.music.android.xx.media.MusicService"

    android:enabled="true"

    android:exported="true"

    tools:ignore="ExportedService">

    <intent-filter>

    <action android:name="android.media.browse.MediaBrowserService" />

    </intent-filter>

    </service>

    <service

    android:name=".service.LocationUpdatesService"

    android:foregroundServiceType="location" />

    <receiver android:name=".service.StopServiceReceiver" />

    <receiver android:name=".service.PlayRadioReceiver" />

    <service

    android:name=".service.MyFirebaseService"

    android:exported="false">

    <intent-filter>

    <action android:name="com.google.firebase.MESSAGING\_EVENT" />

    </intent-filter>

    </service>

    </application>

    </manifest>

    I have a problem figuring out what I did wrong or what I missed . Any help will be greatly appreciated..

    PS: My app had been in the store for 3days

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

    Multiple APK support with Android TV

    Posted: 13 Jul 2020 10:39 PM PDT

    I have been using android app bundle to deploy my app, which currently supports phone and tablets, to play store. Now I am working on TV app but as a separate project, but I wish to keep the package id same as my phone app (single play store entry for both apps).

    My TV app will generate a separate APK and I was wondering how do I upload the apk to my existing play store application. I read through [multiple apk support] (https://developer.android.com/google/play/publishing/multiple-apks), but I still have questions.

    1. Can I upload both AAB and APK for the same app in play store. I know I can uploaded multiple APKs.

    2. How do I clearly mark my APK to be for TV only. Current way of differentiating is using screen size <supports-screens> or <compatible-screens>, which is not really a very clear way of differentiation.

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

    How to update an app on a KIOSK device using a launcher.

    Posted: 14 Jul 2020 04:21 AM PDT

    I have three different tablets (no-name brand) that will only run my app in a KIOSK mode. I want to update the app on these devices.

    So far my progress:

    - I have a "Launcher" application that starts and handles the updating of the "Main" application.

    - The Launcher app receives the new APK over HTTP and saves it in its getFilesDir() (/data/data/packagename/files/)

    My goal at this point to install this APK without prompting the user to allow this installation. AFAIK this is not possible without root access

    I tried this:

    Runtime.getRuntime().exec("chmod 777" + apkLocation); String command; command = "pm install -r " + apkLocation; Process proc = Runtime.getRuntime().exec(new String[]{"su", "-c", command}); proc.waitFor(); 

    But this fails and returns 1. I assume this is because the application does not have root access.

    Also, the application is the active-admin and the device-owner of the device, but still, these permissions don't seem like they gave me the right to do what I mentioned above.

    EDIT: My target API version is 24.

    EDIT2: Another question. Is it possible to silently install an APK by calling the hidden API using reflection?

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

    How to see number of app downloads from google play Developer console? Not Graphs, But Total in number

    Posted: 13 Jul 2020 10:00 PM PDT

    I have uploaded an app to google play. I want to know how many people already downloads the app. Not active users or any other. Not graphs. I need to know the total. How to do that?

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

    Is there a standalone logcat app for windows without using android studio?

    Posted: 14 Jul 2020 02:19 AM PDT

    Is this sub a better place to ask help than Stack Overflow?

    Posted: 14 Jul 2020 02:18 AM PDT

    Or Stack Overflow is better? On Stack Overflow I can't comment and it's such a pain in the ass

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

    App dev toolbox - collection of tools for Android app development

    Posted: 14 Jul 2020 12:37 AM PDT

    Take a look at my new app which brings together a collection of open source libraries of app development tools into one app - http://barbuzz.co.uk/2020/07/13/app-dev-toolbox/

    Hope people find it useful. Thanks.

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

    Leveraging Android Lint Checks

    Posted: 13 Jul 2020 06:16 PM PDT

    MVVM-Redux - Lib to control your states using MVVM and Redux concepts

    Posted: 13 Jul 2020 03:21 PM PDT

    Hi guys. Everything good with you? Imagining an approach like Roxie using MVI and Redux concepts, I create these lib to help the apply of Redux in MVVM. The repo contains two extra artifacts to help you listen or instantiate your ViewModel with init params (If you not use libs like Koin to recover your ViewModel from graph). I think the lib is a good option for you if you would like treats all in your VM like "events". 😆

    Any comments, issues or PRs are very welcome. 🚀

    MVVM-Redux

    submitted by /u/gabriel-brasileiro
    [link] [comments]

    Which one to choose?

    Posted: 13 Jul 2020 11:10 PM PDT

    No comments:

    Post a Comment