• Breaking News

    [Android][timeline][#f39c12]

    Wednesday, September 12, 2018

    Coroutines v0.26.0 – Structured Concurrency Android Dev

    Coroutines v0.26.0 – Structured Concurrency Android Dev


    Coroutines v0.26.0 – Structured Concurrency

    Posted: 12 Sep 2018 07:35 AM PDT

    Android Studio 3.3 Canary 10 available

    Posted: 12 Sep 2018 10:22 AM PDT

    Android development is complex and confusing despite being proficient in Java

    Posted: 12 Sep 2018 03:02 PM PDT

    I've been developing in Java for many years implementing commercial projects of different complexities. I've also been easily switching to TypeScript, Shell scripting, Python when it was needed without significant efforts. Why I'm saying this is because I've spent two months with Android and I can't fill comfortable in it. It was a pet project and I worked on it after work or on weekends, but still I believe it should be enough, especially being experienced in Java.

    When I only started there were some unusual things. First is braking all code conversions. Even on SDK level they often use improper naming, mixed cases, etc. It irritates, but that's ok, may be they had a reason. Second thing is that it is very hard to decouple application components. In most of the cases you are required to pass a Context instance, or an Activity to an API method, or you need to extend some classes that restrict you in another way.

    I desired that I could solve coupling issues via DI. Here comes the third point. After working with Spring Boot or EJB you don't expect anything complex in DI. But Dagger 2 makes you understand that DI is not about simplicity. I spent an evening trying to inject a hello-world component into my activity. Eventually I managed to do so, but I don't even want to think of what it's like to declare a singleton with Dagger.

    Then I decided that it makes sense to implement something working without strictly following architectural patterns. If it worked I would refactor the system later applying some improvements.

    Following this path I implemented a functionally rich application (with video player, audio recording, proper permission handling, view pager, fancy UI and some other things). Of course from code quality perspective it wasn't good, though it is split to logical components, view is separated, etc. I also followed documentation and only used APIs like it was shown there.

    Here comes the main issue. Having a working functionally reach application and running it on a real device I understood that it is completely unpredictable. It failed spontaneously and every time I found different reasons for a fail. For instance, once it failed because I instantiated fragments from factory methods and all fields set in this way were set to null once I rotated a device. I learned that I should have passed them through Bundle instance. I learned that whatever I have in activity view is not always accessible within a fragment that is shown in the activity. 1 from 10 tries would definitely return null. Sometimes an active fragment would return null via getActivity... When the app is minimized you would need to be careful with onPause method as there might be some unpredictable things... It continues by now.

    Eventually I got bored and frustrated. I still want to finish the app, but I have a feeling that I won't start anything else in Android. I love this system, I love it's openness... but what am I doing wrong...

    Of course all of this only means that I'm not good in Android or I didn't invest enough time in understanding it's development principles, or that I'm just dumb. But should it really be so complex to start? Why working with a completely new language is a way easier than working with Android? What was your experience? Do you enjoy developing for Android? What is the proper way to start?

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

    Closing the Android emulator causes my PC to hang for over a minute

    Posted: 12 Sep 2018 09:00 AM PDT

    Recently begun using Android Studio and looking at app development.

    One major snag that I've got is the fact that whenever I run my app and close the emulator, my entire PC (Windows 10) freezes for a good minute or so without any error messages or similar, then the emulator will exit successfully.

    Anyone else had this or knows of a solution?

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

    How to obfuscate admob banner id?

    Posted: 12 Sep 2018 05:50 AM PDT

    Hi guys,

    Sadly my app is being maliciously targeted by a competitor.They are de-compiling my app and are maliciously using my admob banner id to get my account suspended.

    Is there a foolproof way to store the banner id so that someone who decompiles my app can't find it?

    I tried moving it from strings.xml into my build.gradle file as a resValue - but I was still able to find it after decompiling my own app.

    Any help is greatly appreciated.

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

    Clear Architecture: Summary and Book Review

    Posted: 12 Sep 2018 04:05 AM PDT

    Are many of you well versed in both platforms?

    Posted: 12 Sep 2018 10:21 AM PDT

    Experienced in both Kotlin/Java/Android and Swift/iOS?

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

    How Tutanota replaced Google’s FCM with their own notification system

    Posted: 12 Sep 2018 10:43 AM PDT

    Link Movement Method Incredibly Inefficient

    Posted: 12 Sep 2018 03:00 PM PDT

    I know that the library Better Link Movement is praised for fixing a lot of the issues with the system implementation. But one of the biggest problems for me, which it doesn't solve, is the incredible inefficiency that it has - namely when used in a recyclerview.

    Perhaps I'm doing this wrong but based on what the documentation says I use BetterLinkMovementMethod$linkify(Linkify.ALL, textView) inside of onBindViewHolder.

    When I profile my code, that single method takes 20 ms to complete, the rest of the code (which is quite a bit) only takes 10. Given that you need 17 ms or less to be at 60 fps, this is an issue. Are there any alternatives that work better / a different way to do this that I'm missing?

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

    Understanding "Payment is for digital content that may be consumed outside of the app itself"

    Posted: 12 Sep 2018 04:07 AM PDT

    Hey,

    I'm having trouble understanding the Google In-app purchases ToS. In particular from here:

    Developers offering products within another category of app downloaded on Google Play must use Google Play In-app Billing as the method of payment, except for the following cases:

    • Payment is solely for physical products
    • Payment is for digital content that may be consumed outside of the app itself (e.g. songs that can be played on other music players).

    So for example, Fortnite. As I understand, their digital content can be consumed outside the app. In the iOS version, Windows version etc. Why did they have to avoid the Google Play store?

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

    Project that is injecting all the views from xml in each Activity/Fragment with dagger.

    Posted: 12 Sep 2018 09:31 AM PDT

    Hello,

    I've ended up with a project that uses dagger, nothing out of the ordinary, except one thing. It turns out that every view from the xml gets injected via a Daggermodule.

    Basically every activity has a module, when created in the activity/fragment, the module gets the activity passed in and then there is a ton of @Provides, one for each and every view from the xml that gets used by the activity/fragment. Every provides method is a "return activity.findViewById(ID)" and are differentiated with a @Named annotation to separate them. Final thing that happens is theese views gets injected into a separate class that handles dispalying the data (setting the text, setting clicklisteners etc etc..

    Hopefully you kinda get the idea (I've only been able to take a small look on the actual code so i haven't been able to dig up all the specifics)

    Seeing this left me with a bad taste in my mouth. First of all the amount of boilerplate you have to write for every view you need to inject, but also, wouldnt this skyrocket the methodcount really fast?

    Am i missing something good here? I tried finding anything on the internet validating this as something good but i had a hard time really finding anything on this subject at all. The only thing i found was this thread Link where in the comments, Jake Wharton, bolster my idea that this is something bad. Specifically stating that using dagger to inject views will lead to a bad time.

    Except for the bad things i stated above, do i have to worry on even more things? Do anyone here see this as a valid or atleast feasible solution that can explain what i am missing.

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

    How often do you guys use profilers and other performance benmarking tools? Is it required to check performance metrics even when there's no noticeable performance issues?

    Posted: 12 Sep 2018 12:03 AM PDT

    CONSTANT warnings and penalties for metadata violations in Play Store. wtf and sadface.

    Posted: 12 Sep 2018 02:29 AM PDT

    My game is hit with that metadata violation message at most updates. This has stalled several key update releases and today resulted in my app being pulled from the store completely.

    There is absolutely nothing wrong with the metadata - this isn't an uninformed rant. It's been carefully reviewed to make sure it is compliant, so I am at a total loss. I assume there are some bots scanning metadata text for whatever it perceives as violations, but Google gives zero specific information about which content caused the violation. Is anyone else experiencing this?

    Can't link the app for you guys to review cos they pulled it. Devastated, as it was just starting to get traction after months of effort :/

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

    In your opinion, what's the best ad network for my situation?

    Posted: 12 Sep 2018 08:43 AM PDT

    I'm averaging 1M daily returning users and I'm looking to implement a "claim free coins" function/button in my app where a user can click it once per day (I'll even push notify that they have coins they can claim) and they will be dealt a rewarded video ad. Should I go with a provider like Admob or look elsewhere?

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

    Pushjet Fork - Looking for maintainers (x-post from /r/selfhosted)

    Posted: 12 Sep 2018 09:07 AM PDT

    Building a photo booth for Droidcon NYC

    Posted: 12 Sep 2018 12:50 PM PDT

    Does anyone know where i can find images and designs without Copyright to use on android?

    Posted: 12 Sep 2018 06:52 AM PDT

    Can't update app on Play Console

    Posted: 12 Sep 2018 11:30 AM PDT

    I'm new to developing apps and I am trying to update one of my apps that is on the play store. whenever I try to upload my app google will tell me to rename the app to what they want but when I rename it and upload it again it will then tell me to add .apk to the name which will then ask me to rename it again. has anyone else had this happen to them?

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

    Mysql to android bidirectional sync

    Posted: 12 Sep 2018 11:14 AM PDT

    Working on an website (mysql backend) where I'd like data from mysql database to be synced to android app and viceversa.

    I've been searching online and a bit overwhelmed - there seems to be things like realm.io, firebase and AWS appsync as well as I guess I could write `/rest` sync service or something like that.

    What are your go-to approaches for this? is there any tool that Im missing? any opensource solution that does what realm.io does?

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

    which layout is suitable for animation in android?

    Posted: 11 Sep 2018 11:54 PM PDT

    I'm new to android animation.

    Android have some layout like linear, relative, frame, grid, constraint layout.

    I need to know, which layout is suitable for animation like below?

    https://dribbble.com/shots/4155603-Safe-in-cloud-Design

    https://dribbble.com/shots/4853813-Bitcoin-send-flow-Interaction

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

    About the Android Things OS and the terms of use of the Android Things Console regarding the deployment of an app

    Posted: 12 Sep 2018 08:34 AM PDT

    Dear Friends,

    I'm developing a Smart Thermostat that runs on Android Devices and can control a boiler using ESP32 microntrollers. If you want to know more about the project, please visit https://www.smart-thermostat.eu

    The Smart Thermostat was developed for Android, and because of that with little effort, I have adapted it for the Android Things OS, and it can run on a Raspberry Pi 3B without problems. The setup with a Raspberry Pi 3B is the cheapest setup, and I have many users interested in this version. The other alternative is to run the Smart Thermostat on an old ANdroid Phone (see the home page for more details).

    My plan was to develop this project as DIY project. That means, the end users buys the ESP32 microcontrollers, the sensors, the relays or the Pi3B, and builds the system itself. Maybe I could monetize the project with ads, or a little member quota, but the monetizing was not the main objective of the project (although it would be welcome, of course).

    Well, regarding the Android Things version, I have a doubt about the terms of use of the Android Things Console to deploy the app to the end users, and this is the cause of this question on reddit.

    The term of use 1.1 of the Android Things console says that:

    1.1. Android Things Console and Software. Subject to the Terms, Google grants you a limited, revocable, non-transferable, non-exclusive, right to (i) access and use the Android Things Console and (ii) install and use the Software on up to 100 devices per product owned or controlled by you for the sole purpose of internal development and testing of devices that have integrated the Software. These Terms do not provide you with a right to sell, exploit or otherwise distribute any device that has integrated the Software. Commercial rights to use the Software for these purposes must be granted expressly via a separate written agreement with Google ("Distribution Agreement"). The Distribution Agreement will control in the event of a conflict with these Terms

    As said, I'm not planning to produce the thermostat at big scale. My idea was to deploy the software and let the end user build the thermostat itself. I have received the distribution agreement from google, and it is apropiated for startups or companies trying to sell a product at mass scale, but not for my idea. I'm a little bit discouraged now, because now that the development of the first version is done, I realized that I can not distribute the app through the Android Things Console.

    Do you have any ideas how I can distribute the software to the end user, or if it is possible in the first place, with these terms of use? I suppose the terms of use refer only the use of the Android Things Console, not the use of the Android Things OS itself. Maybe I can provide a link for my users to download and flash the img. Of course, this is not so flexible as the update feature that the console provides, but... I could be a solution.

    Apologizes for my not to good english, and possible mistakes, I'm writing from my smartphone.

    Regards Cylon

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

    Will having a reference to your application class in a foreground service running in a different process leak the application when the app is closed?

    Posted: 12 Sep 2018 12:58 AM PDT

    I have a Service running in a different process from the main one (by specifying android:process in the service definition in the manifest). I communicate with it from an activity using startServicce(intent) with different intents, and in turn, the service occasionally broadcasts data through intents using context.sendBroadcast(intent), which are picked up by certain activities.

    I'm considering injecting my Service class with a dagger component made in my Application class. The component uses the application context in resolving some dependencies, and I'm worried that when the application's process is destroyed, my still running service will now hold reference to objects that reference the now gone application context.

    Maybe I don't fully understand how it works, maybe the Application is created for each process?

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

    Managing Android / iOS strings and translations

    Posted: 11 Sep 2018 08:13 PM PDT

    How do you guys manage strings for multi OS projects?

    We have separate developers for iOS and Android for our projects but the strings, and general look and feel, are supposed to be the same (~90%).

    The problem is that UIs are poorly designed beforehand and no strings are defined so they create or update them as they go. Leading to vast differences and increased costs due to redundant string translations.

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

    Is Firebase the only-one solution for push notifications?

    Posted: 12 Sep 2018 12:26 AM PDT

    Hi there, first post here, sorry if someone already asked here (and sorry for my english, lol)- I'm going to create an XMPP chat app and we already have a self hosted server with his DB and stuff (MySQL with Prosody for XMPP). I want to implement real time notification (such as Whatsapp, Telegram etc.). I can't find anything online that doesn't use Firebase, I've searched for hours and hours, at the end all solutions use FCM. I don't want to pay for a service such as Firebase when I have a self hosted server with the necessary setup (...'till now) just for the Push Notifications. OneSignal is free but it uses Firebase at the end (and they sell anonimous data and I don't really like that). Background services are not the solutions (battery drain and Oreo+ solutions). Should I really pay (free plans are not enough for my solution) in order to send XMPP chat notifications? Whatsapp have a service in background, how is that possible? :(

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel