• Breaking News

    [Android][timeline][#f39c12]

    Thursday, November 30, 2017

    Representing View State with Kotlin Data Classes Android Dev

    Representing View State with Kotlin Data Classes Android Dev


    Representing View State with Kotlin Data Classes

    Posted: 30 Nov 2017 05:51 AM PST

    Android Things 0.6.0-devpreview available now!

    Posted: 30 Nov 2017 06:09 AM PST

    Android Firebase email/password authentication and securing data in Firebase Firestore database using the authentication and security rules.

    Posted: 30 Nov 2017 06:39 AM PST

    Kotlin basics meet the receivers

    Posted: 30 Nov 2017 12:57 PM PST

    Taming state in Android with Elm Architecture and Kotlin, Part 3

    Posted: 30 Nov 2017 12:05 PM PST

    Advanced Retrofit

    Posted: 30 Nov 2017 08:18 AM PST

    Is there any open source social network code for facebook or instagram style feeds?

    Posted: 30 Nov 2017 12:48 PM PST

    I am looking to make a social network android app for my college batch with basic text and image posting capabilities. Is there any open source option which I can integrate in my app?

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

    App architecture

    Posted: 30 Nov 2017 02:20 AM PST

    I have been struggling with my app for a while now trying to figure out which architecture components I should be using.

    I have settled for MVVM, and after reading stuff on thousands of tutorials I think I got the grasp of how it should work.

    Now I am undecided on how to implement it:

    • should I use DataBinding? I've seen people both bashing it and praising it
    • should I instead use ButterKnife? RxBinding?
    • should I use LiveData and Architecture ViewModel components?
    • should I use RxJava to observe from the ViewModel? Should I use it for rest api consumption (or repository async calls)?
    • should I use Dagger1, Dagger 2, Dagger 2.10+? Dagger is been hard to understand for me

    I sometimes feel I only want to develop an app and not waste 2 months deciding and learning all these technologies, but theres never a proper example for the combination of these... Also I don't have that much experience with testing so a good example with this would be appreciated.

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

    Inserting objects to beginning of list with Room

    Posted: 30 Nov 2017 12:39 PM PST

    I may have a gross misunderstanding of this whole process and if so please let me know.

    But what I am trying to do is during certain circumstances, I want my @Insert to place the object at index 0 instead of at the end of the List. I've thought of adding another parameter and sorting by that, but was going to see if there was a more eloquent way before I proceeded.

    Thanks!

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

    avdo: a VectorDrawable optimization tool (similar to svgo)

    Posted: 29 Nov 2017 10:25 PM PST

    Error on AdMob Payments site

    Posted: 30 Nov 2017 02:54 PM PST

    I am unable to enter Payment info on AdMob payment site.

    Therefore I am unable to complete my application.

    Javascript console: https://i.imgur.com/KxbIzvCr.png

    buy_flow Failed to load resource: the server responded with a status of 401 () 17:45:57.331 buy_flow?wst=1512081957134&cst=1512081957148&ipi=amlixp6tcpp9&hostOrigin=aHR0cHM6Ly9hcHBzLmFkbW9iLmNvbQ..&mm=e&hl=en_US&style=%3Amd&cn=%24p_od0w06qiyub10:151 [ 0.007s] [goog.net.xpc] CrossPageChannel created: $p_od0w06qiyub10 17:46:00.522 DevTools failed to parse SourceMap: https://apps.admob.com/v2/payments/material_ripple.scss.css.map

    Please send help from Google, I have been uanble to reach a Human Being.

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

    How to synchronise the readme in your android app github repository to your about page automatically on building. (Mostly useful for open source apps).

    Posted: 30 Nov 2017 04:49 AM PST

    Absurdly simple permission library my buddy wrote

    Posted: 30 Nov 2017 02:56 AM PST

    I'm creating a ranked feed to maximize engagement. Please review my algorithm and provide suggestions?

    Posted: 30 Nov 2017 11:11 AM PST

    Hi! I'm writing a feed sorting algorithm for my app to rank posts. Does anyone have any suggestions? I have not been able to find a lot of articles about building a good feed to maximize engagement.

    In the code below, I am calculating a rating based on # of likes, comments, and recency. Then I rank the posts by rating. I also remove promoted posts and then re-inject them as ads.

     //Calculate time values for recency score. Calendar today = Calendar.getInstance(); today.setTimeZone(TimeZone.getTimeZone("America/Chicago")); today.set(Calendar.MILLISECOND, 0); today.set(Calendar.SECOND, 0); today.set(Calendar.MINUTE, 0); today.set(Calendar.HOUR_OF_DAY, 0); long todayTime = today.getTimeInMillis() / 1000; long yesterdayTime = todayTime - 86400 * 6; //Fetch posts from database. ArrayList<Post> postListHolder = new ArrayList<>(); postListHolder.addAll(dbHelper.GetPostsTopVote(yesterdayTime, limit)); postListHolder.addAll(dbHelper.GetPostsTopComments(yesterdayTime, limit)); ArrayList<Post> postAds = dbHelper.GetAds(Constants.AD_LIMIT); //Remove duplicate posts from Top Vote and Top Comments. HashSet<Post> removeDuplicate = new HashSet<>(); removeDuplicate.addAll(postListHolder); postListHolder.clear(); postListHolder.addAll(removeDuplicate); //Remove posts that are ads, inject ads later. Log.d(mActivity, "Ads Count: " + postAds.size()); for (int i = 0; i < postAds.size(); i++) { if (postListHolder.contains(postAds.get(i))) { Log.d("PostID", String.valueOf(postAds.get(i).getId())); postListHolder.remove(postAds.get(i)); } } //Calculate max values to generate ratio for score. double maxLike = 1; double maxComments = 1; int maxRecent = 0; for (int i = 0; i < postListHolder.size(); i++) { if (postListHolder.get(i).getLikesCount() > maxLike) { maxLike = postListHolder.get(i).getLikesCount(); } if (postListHolder.get(i).getCommentsCount() > maxComments) { maxComments = postListHolder.get(i).getCommentsCount(); } if (postListHolder.get(i).getCreateAt() > maxRecent) { maxRecent = postListHolder.get(i).getCreateAt(); } } if (maxLike < 1) maxLike = 1; if (maxComments < 1) maxComments = 1; //Get current time for recency calculation. Date currentDate = new Date(); Long currentTime = currentDate.getTime() / 1000; //Calculate the score for each post. for (int i = 0; i < postListHolder.size(); i++) { double rating = 0; double likeRating = (postListHolder.get(i).getLikesCount() / maxLike) * LIKE_WEIGHT; double commentRating = (postListHolder.get(i).getCommentsCount() / maxComments) * COMMENTS_WEIGHT; double recentRating = (double) (currentTime - maxRecent) / (currentTime - postListHolder.get(i).getCreateAt()) * RECENT_WEIGHT; rating = likeRating + commentRating + recentRating; postListHolder.get(i).setRating(rating); } //Sort posts into descending order based on score. Collections.sort(postListHolder, new Comparator<Post>() { public int compare(Post o1, Post o2) { if (o1.getRating() == 0 || o2.getRating() == 0) return 0; double t1 = o1.getRating(); double t2 = o2.getRating(); if (t1 > t2) return -1; else if (t1 < t2) return 1; else return 0; } }); //Insert ads into feed. int adPosition = 0; for (int i = 0; i < postAds.size(); i++) { //Set ad as 1st if (i == 0) { postListHolder.add(adPosition, postAds.get(i)); } //Set next ad above the fold. if (i == 1) { adPosition = 3; postListHolder.add(adPosition, postAds.get(i)); } //Set additional ads every 4 posts. if (i > 1) { adPosition = adPosition + 4; postListHolder.add(adPosition, postAds.get(i)); } } 

    I've tried to minimize the number of times the list needs to be looped through and also used built in Java methods like Hashset to handle duplicates. Any additional optimizations or tips for building better feeds? Thanks!

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

    Anyone have problems with constraintLayout-1.1.0-beta3?

    Posted: 30 Nov 2017 10:47 AM PST

    Like many others, I am anxiously awaiting the final release of Constraint Layout 1.1.0!

    Others and I on my team have been using beta3 for some time now, and haven't seen any issues with that version (yet) compared to 1.0.2.

    Has anyone seen bugs in beta3?

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

    Newbie question about code in Android Twitter apps

    Posted: 30 Nov 2017 10:37 AM PST

    Hi, I use an iOs Twitter client called Tweetbot but sadly they don't make it for Android or PC. I can't find a single Android or PC Twitter app which "keeps your place" in the timeline. They all auto-refresh, leaving me to scroll like mad to find the last tweet I read...only to be bumped back up to the top again. I use multiple accounts and I need this feature or I can't get an Android phone.

    Is there some reason this is really hard to code? I know exactly nothing about coding so I'm wondering if there is a technical reason why nobody offers this feature. Google shows me lots of other people looking for the same thing.

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

    Android Developers Backstage: Episode 84: Instant Apps

    Posted: 29 Nov 2017 05:02 PM PST

    RetrofitCache let retrofit2,okhttp3,rx add cache so easy. You can config cache strategy with each api by annotation.Also you can config mock data with each api easily.

    Posted: 29 Nov 2017 11:31 PM PST

    Newbie question: What tech stack is used to develop Android apps?

    Posted: 30 Nov 2017 08:25 AM PST

    I'm a web-app developer with a background in Node / Express / Javascript / Angular and of course HTML and CSS. I'm curious how much of this transfers over to android development and what uniquely new languages I'll have to learn.

    Any advice is highly appreciated!

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

    What are some good online app competitions for my first app?

    Posted: 29 Nov 2017 09:19 PM PST

    I'm looking for more ways to promote my first app and thought I'd try my hand at entering it in some competitions. Can you guys suggest any for a first timer?

    Thanks!

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

    How to download files from server with security?

    Posted: 29 Nov 2017 03:59 PM PST

    I'm making a rhythm game and want to be able to serve the music tracks as the player unlocks them instead of downloading everything when installing the app for the first time.

    But I also don't want anyone to simply be able to take musician's music on a whim. How can I programatically incorporate some sort of security to download music files?

    I have already found articles on how to make http requests and on how to save the files internally to the app. I'm looking for a security/password protection way of hosting music files on a server and then dishing them out safely to the app.

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

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel