• Breaking News

    Saturday, April 25, 2020

    Android Dev - App Feedback Thread - April 25, 2020

    Android Dev - App Feedback Thread - April 25, 2020


    App Feedback Thread - April 25, 2020

    Posted: 25 Apr 2020 05:28 AM PDT

    This thread is for getting feedback on your own apps.

    Developers:

    • must provide feedback for others
    • must include Play Store, GitHub, or BitBucket link
    • must make top level comment
    • must make effort to respond to questions and feedback from commenters
    • may be open or closed source

    Commenters:

    • must give constructive feedback in replies to top level comments
    • must not include links to other apps

    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.

    - Da Mods

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

    Github Template for starting an Android app project with: 100% Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc dependencies already set up.

    Posted: 25 Apr 2020 03:38 AM PDT

    AsyncAndroid - "Be Together even When We're Apart". A new YouTube channel gathering collections of developer-created content from just some of the amazing members of the Android community and publishes them in drops so that we all can share, teach, learn, and connect remotely.

    Posted: 24 Apr 2020 09:19 PM PDT

    Were you affected by the Google Maps crash? Are you planning some fallback to prevent similar scenario in the future?

    Posted: 25 Apr 2020 06:49 AM PDT

    Context: Yesterday a bug in the Google Maps SDK started causing crashes on all the apps that were using it causing a major disruption. Here the issue track on Google's end: https://issuetracker.google.com/issues/154855417

    Did someone have a fallback in place to prevent such crashes?

    Or similarly if someone is working on a potential fallback solution to switch to another Map provider at runtime?

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

    How to decouple threading and execution (e.g: RxJava, Coroutine) from repositories and use cases?

    Posted: 25 Apr 2020 01:56 AM PDT

    Decoupling the dependencies into modules will help you to easily maintain the code, test and replace dependencies. That's cool, but all the tutorials that I'm watching they are implementing directly RxJava and Coroutine directly into the modules.

    High level modules will look something like this:

    RxJava:

    fun getUsers(): Observable<List<User>> 

    Coroutine:

    suspend fun getUsers() = suspendCancellableCoroutine { continuation -> if (!continuation.isCancelled) { .... 

    And in order to interrupt or cancel the execution, we need to store the RxJava's disposable into a CompositeDisposable and for the Coroutine a list of jobs that we can cancel.

    Let's say we're having a RegisterUserUseCase within our ViewModel, and when the onCleared is called we call the use case's class dispose function:

    fun dispose() { // Rx Java this.compositeDisposable().dispose() // Coroutine this.jobs.forEach { job -> job.cancel() } } 

    What if in the future I want to replace RxJava or Coroutine with something else? Let's say I want to use Realm/Firebase or some other 3rd party library. Realm and firebase are using their own observable pattern/callbacks and if I remove RxJava or Coroutine I need to refactor the whole module(s), because I directly used RxJava and Coroutine (all functions are declared suspend and I need to remove the suspend name; etc).

    Declaring RxJava or Coroutines directly doesn't contradict with the ideaology of clean architecture/S.O.L.I.D? All I can think now is having another layer of abstraction where the interface class are having the basic CRUD operations and lifecycle calls (create/destroy) and within this layer to implement the data storing logic.

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

    Dagger SPI - Extending Dagger with custom Dependency Graph validations

    Posted: 25 Apr 2020 03:29 AM PDT

    Check out this easy to use android/kotlin form validation library.

    Posted: 25 Apr 2020 07:47 AM PDT

    Recently, I have developed an Android form validation library. It is highly customizable and easy to use. This library will works with TextView, EditText, AppCompatEditText, TextInputEditText, TextInputLayout and CheckBox. This library is designed in such a way that It's easy to add support for new widgets and add new rules.

    Github: https://github.com/Dhaval2404/android-form-validation

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

    Anyone who Android development with WSL 2 and a real Android device? How do you get the USB to be recognized by Ubuntu?

    Posted: 25 Apr 2020 05:48 AM PDT

    Need help testing app on Samsung phones

    Posted: 25 Apr 2020 08:17 AM PDT

    Hello.

    After last update of app I get numerous reports from Samsung phone users that they are unable to pick a photo.

    I have another test build but unfortunately I don't have any Samsung devices to test it. App is a paid app on Google Play so I can't publicly provide test APK but I'll send you APK and short instructions on how to test it after you PM me.

    This should take no more than 10 minutes of your time total, looking forward for Reddit's help!

    Best regards,
    Oleksandr

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

    Android Studio: No "Android" Button - I don´t know which Setting is missing.

    Posted: 25 Apr 2020 07:24 AM PDT

    I would like to open a APK in my Android Studio (Version 3.6.3) to see the structure of it.

    As you see in this picture: https://imgur.com/a/jdGTB15 under "1." there is no option to choose "Android" as seen in Nr. "2".

    My question for you: How do I enable the "Android" Button in the Drop down menu, so that i am able to see the structure as seen in "2."

    Hope it´s clear. i really don´t know what I can do. Thank you in Advance!!

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

    I'm thinking of making a youtube tutorial. What do you think i should demonstrate / teach?

    Posted: 25 Apr 2020 07:23 AM PDT

    Open Source - Zeplin Android App!

    Posted: 25 Apr 2020 07:14 AM PDT

    Can't seem to enable Gradle online mode in AS 3.6.3 - Where the heck is it?

    Posted: 25 Apr 2020 07:09 AM PDT

    I was building a sample project offline and tried the "Enable Offline" Gradle build mode (or something like that). It didn't work because (I guess) I don't have all the dependencies previously downloaded. I'm now back online and can't seem to get back to online build mode.

    I thought it used to be in File->Settings->Build, Execution, Deployment->Gradle, but it's not there.

    If I Ctrl-Shift-A, and search "offline", it only shows up if I select the "Included disabled actions", and then, since it's apparently a disabled action, I can't enable it.

    Not really sure what to do.

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

    [Flutter] Google Sign in with Firebase Authentication Tutorial

    Posted: 24 Apr 2020 11:36 PM PDT

    Device Compatibility Issues

    Posted: 25 Apr 2020 07:07 AM PDT

    Hello :)

    I recently developed an app and published it on the Play Store. Some friends reported that they were unable to download it, because that message would appear: your device is not compatible with this version.

    They informed me of the cell phone models, so I could check it out on the Google Play Console. In the devices tab, I noticed that the models that my friends had were compatible.

    Has anyone had a similar problem with this?

    Thanks

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

    Android Photo problem

    Posted: 25 Apr 2020 06:58 AM PDT

    This has been bothering me for a really long time but I use many apps to make photo edits, video edits, ETC and every single app his it's own album that it posts to. Is there anyway I could make it so that I have 2 albums on my phone where it's just photos and videos and have all apps send to

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

    Anyone know a way to snoop on creative ad assets (ads under which they advertise) from competitors?

    Posted: 25 Apr 2020 06:25 AM PDT

    In App Purchases implementation

    Posted: 25 Apr 2020 05:42 AM PDT

    New to android development and I'm trying to implement a simple non - consumable one time in app purchase for my app, specifically to remove the ads. I have added the managed product in google play console and the 'com.android.billingclient:billing:2.2.0' on my gradle file. After lots of research and random YouTube videos i ended up with this piece of code:

    public class MainActivity extends AppCompatActivity implements PurchasesUpdatedListener { private BillingClient billingClient; private List skuList = new ArrayList(); private String sku = "remove_ads"; private Button buyBtn; Boolean b = getBoolFromPref(this, "myPref", sku); if (b) { buyBtn = findViewById(R.id.buyBtn); buyBtn.setVisibility(View.INVISIBLE); buyBtn.setEnabled(false) // remove ads here } else { buyBtn = findViewById(R.id.buyBtn); buyBtn.setVisibility(View.VISIBLE); buyBtn.setEnabled(true) // enable the ads here } private void setupBillingClient() { billingClient = BillingClient.newBuilder(this).enablePendingPurchases().setListener(this).build(); billingClient.startConnection(new BillingClientStateListener() { @Override public void onBillingSetupFinished(BillingResult billingResult) { if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) { loadAllSkus(); } } @Override public void onBillingServiceDisconnected() { } }); } private void loadAllSkus() { if (billingClient.isReady()) { final SkuDetailsParams params = SkuDetailsParams.newBuilder().setSkusList(skuList).setType(BillingClient.SkuType.INAPP).build(); billingClient.querySkuDetailsAsync(params, new SkuDetailsResponseListener() { @Override public void onSkuDetailsResponse(BillingResult billingResult, List<SkuDetails> skuDetailsList) { if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) { for (Object skuDetailsObject : skuDetailsList) { final SkuDetails skuDetails = (SkuDetails) skuDetailsObject; if (skuDetails.getSku().equals(sku)) { buyBtn = findViewById(R.id.buyBtn); buyBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { BillingFlowParams params = BillingFlowParams.newBuilder().setSkuDetails(skuDetails).build(); billingClient.launchBillingFlow(MainActivity.this, params); } }); } } } } }); } } @Override public void onPurchasesUpdated(BillingResult billingResult, @Nullable List<Purchase> purchases) { int responseCode = billingResult.getResponseCode(); if (responseCode == BillingClient.BillingResponseCode.OK && purchases != null) { for (Purchase purchase : purchases) { handlePurchase(purchase); } } else if (responseCode == BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED) { setBoolInPref(this, "myPref", sku, true); } else if (responseCode == BillingClient.BillingResponseCode.USER_CANCELED) { } } private Boolean getBoolFromPref(Context context, String prefName, String constantName) { SharedPreferences pref = context.getSharedPreferences(prefName, 0); // 0 - for private mode return pref.getBoolean(constantName, false); } private void handlePurchase(Purchase purchase) { if (purchase.getSku().equals(sku) && purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED) { setBoolInPref(this, "myPref", sku, true); AcknowledgePurchaseParams acknowledgePurchaseParams = AcknowledgePurchaseParams.newBuilder() .setPurchaseToken(purchase.getPurchaseToken()) .build(); AcknowledgePurchaseResponseListener acknowledgePurchaseResponseListener = new AcknowledgePurchaseResponseListener() { @Override public void onAcknowledgePurchaseResponse(BillingResult billingResult) { } }; billingClient.acknowledgePurchase(acknowledgePurchaseParams, acknowledgePurchaseResponseListener); Toast.makeText(this, "Thanks for buying. Ads are now removed. Enjoy.", Toast.LENGTH_SHORT).show(); } else if (purchase.getPurchaseState() == Purchase.PurchaseState.PENDING) { // Here you can confirm to the user that they've started the pending // purchase, and to complete it, they should follow instructions that // are given to them. You can also choose to remind the user in the // future to complete the purchase if you detect that it is still // pending. } } private void setBoolInPref(Context context, String prefName, String constantName, Boolean val) { SharedPreferences pref = context.getSharedPreferences(prefName, 0); // 0 - for private mode SharedPreferences.Editor editor = pref.edit(); editor.putBoolean(constantName, val); editor.commit(); } 

    Using the test purchase with myself it seems to work fine. It launches the billing flow fine and after the purchase the ads are removed and also the buyBtn disappears.

    However there is a small weird problem.

    If i uninstall and then install the app again, the ads re appear, as well the buyBtn.

    But, (and this is where I am really confused) if I click on the buyBtn and restart the app, the ads are removed together with the buyBtn. The billing flow doesn't launch nor there is any other notification.

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

    Android 11 Toast Updates

    Posted: 24 Apr 2020 08:44 AM PDT

    LiveData<PagedList<Model>> - How to manually iterate?

    Posted: 25 Apr 2020 05:06 AM PDT

    Use case:

    Have a database (Room). Want to fetch a list of records, and iterate through them one by one, manually. Don't want to load all the fetched records at once in memory, as the list might be huge. Hence using PagedList (of page size 1). Want to subscribe to changes. Hence using LiveData. Now I want to manually iterate through all the records. Suppose I fetched the list with 20 records in my Activity. First I want to find one record based on some condition (suppose by id), and display it. Suppose it is having index of 5. Then if the user clicks next button, I want to display the next record, i.e. with index 6. Then again next: index 7. Then prev: index 6. Like this. P.S. As of now I'm using Positional DataSource. Later on I'll migrate to some other one (say, PageKeyedDataSource). So the solution should work even then.

    How to implement this?

    I've Googled for hours, but couldn't find any solution or example or any tutorial of this sort.

    Any help will be greatly appreciated.

    Thanks.

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

    Android Testing Tips

    Posted: 25 Apr 2020 03:47 AM PDT

    I'm an Android Developer for about 3years, built few apps. What I want to discuss in this post is about Testing for Android Apps that include Unit Test, Integration Test, UI Test.

    I realized that without testing I can't be a real developer. And that's what I want to find out from you guys. How should I start? What should I test for example? Do you have any tips before I start to go more into Testing Field?

    Any tips, recommendations, and experience are welcome.

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

    My spare time app "Contacts Sync" was suspended and removed after so long

    Posted: 25 Apr 2020 03:41 AM PDT

    Working with mi band data

    Posted: 25 Apr 2020 03:16 AM PDT

    Hi everyone, I'm currently working on my senior thesis and one of the features I would like to implement is mi band communication. The main purpose of it would be to either get the step count, heart rate etc. directly from the Mi Fit app or build my own application to communicate with the band and send the data to a server. I have found the GadgetBridge Git but I am currently overwhelmed by the amount of info there. I was wondering if any of you know a place to start for this type of project.
    Thank you!

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

    Mentorship in exchange for help building out my app idea

    Posted: 25 Apr 2020 02:41 AM PDT

    I wanted to offer my mentorship for anyone who wants a project to work on. I can give detailed code reviews, share product development tips, teach you how to design in Sketch if that's something you're interested in.

    I'm working on an app called WorkoutFH (https://play.google.com/store/apps/details?id=com.compscieddy.workoutfh). It's an app to help you log your workouts with a special focus on workouts that you can do from home.

    Before I joined a FANG company as an Android Software Engineer, I built and designed a journaling app called Writeaday that I was able to grow to 500K+ installs, 60K MAU.

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

    Android 11 Developer Preview 3 released

    Posted: 24 Apr 2020 10:17 AM PDT

    No comments:

    Post a Comment