• Breaking News

    [Android][timeline][#f39c12]

    Monday, January 8, 2018

    Weekly "who's hiring" thread! Android Dev

    Weekly "who's hiring" thread! Android Dev


    Weekly "who's hiring" thread!

    Posted: 08 Jan 2018 04:46 AM PST

    Looking for Android developers? Heard about a cool job posting? Let people know!

    Here is a suggested posting template:

    Company: <Best Company Ever>
    Job: [<Title>](https://example.com/job)
    Location: <City, State, Country>
    Allows remote: <Yes/No>
    Visa: <Yes/No>

    Feel free to include any other information about the job.

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

    Weekly Questions Thread - January 08, 2018

    Posted: 08 Jan 2018 02:56 AM PST

    This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, or Stack Overflow before posting). Examples of questions:

    • How do I pass data between my Activities?
    • Does anyone have a link to the source for the AOSP messaging app?
    • Is it possible to programmatically change the color of the status bar without targeting API 21?

    Important: Downvotes are strongly discouraged in this thread. Sorting by new is strongly encouraged.

    Large code snippets don't read well on reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

    Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

    Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click this link!

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

    After much hard work - tutorial on Uncle Bob's TDD technique is complete. This part - refactoring, bugs, importance of testing.

    Posted: 08 Jan 2018 08:19 AM PST

    The CommonsBlog — The Android Version Ratchet

    Posted: 08 Jan 2018 08:55 AM PST

    API Quirks - a technical writeup snorkeling into some of the nuances, oddities, and fun parts of working with different APIs

    Posted: 08 Jan 2018 09:27 AM PST

    Reactive Play Billing - An RxJava wrapper for the Google Play Billing Library

    Posted: 08 Jan 2018 06:41 AM PST

    help with android studio 3.0.1

    Posted: 08 Jan 2018 04:44 PM PST

    hi, i recently downloaded android studio 3.0.1 and tried creating an app, i have no programming experience whatsoever so i decided to watch some tutorials and try to learn that way but most of them were using android studio 2, is there a way to use the android studio 2 commands in android studio 3?. many things were different and many commands didn't work so i'm not really sure what should i do, do you think that i should try making the app in android studio 2? is it outdated? should i use a different program? thanks.

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

    Reactive apps architecture design asymnetry that bothers me

    Posted: 07 Jan 2018 09:06 PM PST

    Hey, I am trying to use RxJava throughout the app, I really like the concept, however I struggle with design, as blogposts at tech talks make it too simplistic.

    First thing that bothers me is what everybody uses as example -- Repository exposes a cold observable which is say forexample request observable. Ui/Presenter subscribes, however when it unsubscribes it cancels the request. This is super bad if you had some flatMaps on the stream which write to database .. Ui goes away and you skip your writing to database, bad.

    Okay maybe the layer which outlives presenter should subscribe and relay emits to Relay which it exposes. I.e. there are pair methods, 1. void that subscribes the obs, 2. that exposes the relay. I like this design because it remind me of eventbus, just a passive observer like this:

    class @Singleton RestManager private final BehaviorRelay<FooEvent> mFooRelay public void requestFoo() { retrofitApi .foo() .map(foo -> FooEventSuccess(foo)) .onErrorReturn(__ -> FooEventError()) .startWith(FooEventLoading()) .subscribe( mFooRelay )} } public Observable<FooEvent> fooObservable() { return mFooRelay.hide() } 

    This is pretty much what people parrot around here that you should use disc as single source of truth, (which I dont think is always necessary, you then uptake problematics of syncing, purging, invalidating database), but lets say that mFooRelay is our single source of truth, which is good.

    However when you subscribe, you jump out of the reactive world. By doing which you loose all of control of streams, i.e. fo rexample requests will be independent. No way (at least to my limited rx knowledge) to manage their races, incoming order. etc. Like in this case.

    sortObservable .switchMap(sort -> paginationObservable() .switchMap(pageIndex -> mRestManager.requestFoo(sort, pageIndex))) .subscribe(fooEvent -> ...) 

    For every new sort setting from ui or new page you need to rerun request. You need that requestFoo() to return Observable in order for it to get unsubscribed when new pageIndex or sort comes. Otherwise its independent requests, were back in before-rx-times. When you unsubscribe the relay it does nothing to its "upstream" which it proxies. Or the posterbody rx example edittext -> switchmap apirequest per letter.

    So maybe its okay for some observables to be ui bound, for some its not.

    This asymmetry bothers me. I dont see anyone talking about it.

    When its ui bound you need to restore the state manually, retained object, presenter, parcelable whatever. When its not you dont need to. Now I have some presenters retained, some not. Idk, feels weird, im frustrated

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

    Looking for a comprehensive MVP app repo

    Posted: 08 Jan 2018 03:38 AM PST

    Can anyone point me to a good android MVP app repository with unit tests?

    I am specifically interested in a MVP implementation where in-flight network requests are preserved across config changes and the UI is updated when available to the user.

    Thank you!

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

    What type of monitor should I get as a secondary display?

    Posted: 08 Jan 2018 04:00 PM PST

    I'm going to be using Android studio to develop Android apps and I'm also going to be using pycharm (a python IDE) for web development and data science. Right now I have a 25 inch LG ultrawide monitor for development and it does pretty decent but I want more real estate to code. Should I go with another ultrawide monitor or just a normal 16:9 ratio one? What size monitor would be fine? Should I use it in vertical mode or just keep it in horizontal mode?

    I want a monitor on the stand it comes with so if I should use the monitor vertically then it needs to be able to do it natively. I'm looking for a full hd screen with a budget in between $100-175. I'm not posting this in the programming Reddit group is because they don't allow text entries.

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

    Help With Setting Up Github for Android Studio

    Posted: 08 Jan 2018 03:53 PM PST

    Hi guys! I'm making my first basic Android application on Android Studio and I'm trying to learn how to use GitHub as a method of version control (still a very beginner programmer). I think I messed up the configuration for linking my project to GitHub and I could use y'alls help! First time, I shared my project on GitHub but I accidentally only pushed the .java files to GitHub. In an attempt to get the rest of my application to GitHub (before I made some bigger changes to it), I shared my project on GitHub again but this time made sure to select the entire application directory (different repo). For some reason, however, it pushed all the files EXCEPT the .java files that were in the original repository. If I could get some help with figuring out how to correctly use GitHub on Android Studio, that would be great. Thanks!

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

    Looking for an app: Smartwatch button "touches" connected phone screen

    Posted: 08 Jan 2018 03:38 PM PST

    Background: For Christmas, I got a generic smartphone VR headset; It works fine, but unlike Google Cardboard, my headset doesn't have an integrated button to touch the phone screen while its' in the headset.

    I was wondering if there was a smartwatch app that can transmit the input signal of a center-screen touch to a smartphone upon the touch of a smartwatch button; In simpler terms, a smartwatch app that allows the user to "touch" their smartphones' screen by pressing a button on their smartwatch's screen.

    Perhaps a simpler name for such an app would be, "Google Cardboard Bluetooth Controller"? Googling that gives vague results, so I was hoping to reach out to someone who knows an app of this concept directly.

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

    Show ads only for new users

    Posted: 08 Jan 2018 05:23 AM PST

    I am thinking of putting ads onto my app but only for new users and not for people who have already downloaded it. The type of ads which can be removed using in-app purchases.

    Is this possible and how would I do it? Also, is this bad practice?

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

    Caution when moving offline-capable apps from Firebase to Firestore

    Posted: 07 Jan 2018 08:09 PM PST

    Firestore was touted as being mostly like Firebase but with a couple nice things like compound queries.

    But one of the nice things about Firebase was that everything was asynchronous. This means that generally, if your app was offline, it would work the same as if online, and there were several RxJava libs written on top of it that utilized that fact.

    Firestore however also has synchronous behavior. This means that synchronous listeners (like onComplete and onError) will block when your app is offline, possibly causing your app to hang. It also means that you must test offline and online as separate paths, and it is more work to make things work consistently when offline vs on. All of this is documented pretty poorly at present but there have been several stackoverflow items illustrating the difference:

    https://stackoverflow.com/questions/46672630/addoncompletelistener-not-called-offline-with-cloud-firestore

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

    Rewarded video ad is not loaded

    Posted: 08 Jan 2018 02:30 PM PST

    I have three kinds of ads in my app (banner, interstitial and rewarded). All those ads work when I use test ad ID, but when I use my actual Admob add ID, only banner and interstitial ads work and rewarded video ad never gets loaded, why?

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

    What do you want to learn in 2018? Here are some examples from Android devs from Novoda.

    Posted: 08 Jan 2018 05:29 AM PST

    Introducing Hunt, a brand new open source Product Hunt app. Free to download.

    Posted: 08 Jan 2018 07:39 AM PST

    Hey guys, I decide to open source my side project I've been working on for a while. I used lots of latest libraries like GraphQL, Litho, Store... in there. Feel free code review and submit issues. Feedback are more than welcome. Visit me at https://medium.com/@Cuong.Le/open-sourcing-hunt-d49919960ef1

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

    Translating apps with google docs

    Posted: 08 Jan 2018 02:28 AM PST

    I remember that I once saw a script or plugin that helped using google documents to translate my app resource strings, but can't find it anymore.

    I want to check it again, does anyone know something like this?

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

    Android binary patch lib, merge APK with native code. This lib can use incremental update app, let download APK size more smaller.

    Posted: 08 Jan 2018 06:32 AM PST

    Youtube pagination ProgressBar

    Posted: 08 Jan 2018 05:26 AM PST

    Sending Messages from App Server to Clients Using FCM

    Posted: 07 Jan 2018 10:32 PM PST

    Youtube ProgressBar

    Posted: 08 Jan 2018 07:16 AM PST

    Youtube app uses a nice ProgressBar for pagiantion.The ProgressBar goes down using transition and then dissapear when the process ends,so I created a Custom ProgresBar as youtube app has.I made this for the community.Star it if you like it : https://github.com/herou/Youtube-Pagination-ProgressBar

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

    Taking a number of photos in Android app

    Posted: 07 Jan 2018 06:00 PM PST

    G'day all.

    I'm new to developing on Android so, although I've done a large amount of searching, I'm not sure if this question is trivial to answer. Please accept my sincerest apologies if it is.

    I'm attempting to design an app which, amongst other things, will take photos and upload them to my workplace's server. The upload section I've got my head around, but I would like to be able to take a number of photos simply and store them in a location on the device SD card. It looks like the method of taking photos with intents is designed to take a single photo. What I would like to do is show the camera app, then a preview of the image taken, followed by the camera app, etc. When the user presses the back button on the device (or an on-screen close button), I'd like to be able to show them a list of the photos taken.

    Is this repeated photo taking a trivial thing to do, and how do I control the folder in which all of these photos are saved?

    Thanks in advance!

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

    Need help to implement RecyclerView with ViewHolder best practices

    Posted: 08 Jan 2018 12:53 AM PST

    I have an RecyclerView.Adapter that looks like this:

    class CategoryListAdapter(private val listener: CategoryListListener): RecyclerView.Adapter<CategoryViewHolder>() { private lateinit var itemTouchHelper: ItemTouchHelper private val items = mutableListOf<Category>() override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CategoryViewHolder { return ViewHolder(parent.inflate(R.layout.list_item_category)) } override fun onBindViewHolder(holder: CategoryViewHolder, position: Int) { holder.bind(items[position]) } override fun getItemCount(): Int = items.size override fun onAttachedToRecyclerView(recyclerView: RecyclerView) { super.onAttachedToRecyclerView(recyclerView) itemTouchHelper = ItemTouchHelper(ItemTouchHelperCallback()).apply { attachToRecyclerView(recyclerView) } } fun setItems(updatedItems: List<Category>) { // Apply changes with DiffUtil items.apply { clear() addAll(updatedItems) } } inner class CategoryViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), Bindable<Category> { override fun bind(element: Category) = with(itemView) { imageView.setColorFilter(element.color) textView.text = element.name dragButton.setOnTouchListener { _, motionEvent -> if (motionEvent.action == MotionEvent.ACTION_DOWN) { itemTouchHelper.startDrag(this@ViewHolder) } false } setOnClickListener { listener.onCategoryClicked(element) } } } interface CategoryListListener { fun onCategoryClicked(category: Category) } } 

    I understand that this code has two major flaws:

    • The CategoryViewHolder should really be a static class, not an inner one, but I need to access the listener as well as the itemTouchHelper in my ViewHolder
    • I set the OnClickListener in the onBindViewHolder method, but I should really set it in onCreateViewHolder. This is mainly because I need the clicked category, not only the index (which I could retrieve with getAdapterPosition()

    How can I achieve the same functionality while following best practices and guidelines?

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

    Learn how to define shared business logic for clients on different platforms

    Posted: 08 Jan 2018 12:04 AM PST

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel