• Breaking News

    [Android][timeline][#f39c12]

    Monday, July 30, 2018

    Weekly "who's hiring" thread! Android Dev

    Weekly "who's hiring" thread! Android Dev


    Weekly "who's hiring" thread!

    Posted: 30 Jul 2018 05:46 AM PDT

    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 - July 30, 2018

    Posted: 30 Jul 2018 03:56 AM PDT

    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]

    Android Studio 3.2 Beta 5 now available

    Posted: 30 Jul 2018 09:15 AM PDT

    Loaders are deprecated as of Android P (API 28)

    Posted: 30 Jul 2018 09:16 AM PDT

    Complex Android animations - Tutorial

    Posted: 30 Jul 2018 10:10 AM PDT

    I wrote a simple Gradle plugin to help you version your apps.

    Posted: 30 Jul 2018 02:48 AM PDT

    RecylerView List Adapter Template in Kotlin

    Posted: 30 Jul 2018 11:38 AM PDT

    Google rejected my request to remove an insulting review.

    Posted: 30 Jul 2018 01:58 PM PDT

    Someone gave my app a 1-star review and wrote:

    من طاح حظكم وحظ البخاري الداعشي

    which translates to:

    worst of luck to you and Al-bukhari of ISIS.

    my application is about some Islamic-Sunnah books, and Al-bukhari is one of the authors, needless to say the man died centuries ago.

    I flagged the review, and later I got this message from google:

    Your request to remove this review was rejected.

    Is there anything I can do about it?

    submitted by /u/6UpsideDownTrees
    [link] [comments]

    Looking for code review on my MVVM arch components coroutines app

    Posted: 30 Jul 2018 01:55 PM PDT

    Over the past couple of weeks I've been working on a small app to view exoplanet data provided by the open NASA API. The main reason for starting this app was to learn MVVM, arch components, and coroutines.

    A few things I ran into which kind of stumped me were:

    1) What to do with single events such as navigating to a new activity.

    2) How to write effective MVVM tests.

    3) Should my repositories return live data?

    Would appreciate it if you could take a quick look and give your feedback on what I could be doing better.

    Here is the repo: https://github.com/AidanLaing/Exoplanets

    The app is completely open source and not published on the play store.

    Thanks :)

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

    Trying to transition into Android Development, had a couple of queries.

    Posted: 30 Jul 2018 08:37 AM PDT

    I've been a Ruby on Rails dev for about 4 years now;trying to move into Android Development.

    I had a couple of queries regarding the transition.

    • What are the topics which are a must know as an android dev?
    • What topics are something I can catch up on later but are not a huge priority?
    • What would be your primary concern about hiring me and what'd you recommend I do to remedy it?
    • I'm fairly conversant with Java, should I spend some to learn Kotlin now or is it something I can catch up later and I've other stuff to learn?
    • What's your go to parameter to determine how good/bad an android dev is?
    submitted by /u/possessd
    [link] [comments]

    Problem with armeabi ABI

    Posted: 30 Jul 2018 12:46 PM PDT

    I'm new to android dev. I'm trying to get sdl working but I get the error

    Android NDK: INTERNAL ERROR: The armeabi ABI should have exactly one architecture definitions. Found: ''
    process_begin: CreateProcess(NULL, "", ...) failed.

    Any ideas? This looks like it might be easier https://github.com/georgik/sdl2-android-example/

    However gradle isn't in my path and I'm not sure if I'm suppose to be writing it in android studio somewhere or in the terminal. I'm on windows.

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

    Fragment related pitfalls and how to avoid them

    Posted: 29 Jul 2018 05:29 PM PDT

    Long time lurker here, decided to share some of my learnings related to using Android Fragments, the pitfalls and how to avoid them.

    1. Don't use platform fragments (android.app.Fragment), they have been deprecated and can trigger version-specific bugs. Use the support library fragments (android.support.v4.app.Fragment) instead.

    2. A Fragment is created explicitly via your code or recreated implicitly by the FragmentManager. The Fragment Manager can only recreate a Fragment if it's a public non-anonymous class. To test for this, rotate your screen while the Fragment is visible.

    3. FragmentTransaction#commit can fail if the activity has been destroyed. java.lang.IllegalStateException: Activity has been destroyed

      Why - This can happen in the wild where say right before FragmentTransaction#commit executes, the user gets a phone call and your activity is backgrounded and destroyed. How to trigger manually - The easy way to manually test this is to add a call to Activity#finish right before FragmentTransaction#commit.

      Fix - Before doing FragmentTransaction#commit, check that the activity has not been destroyed -Activity#isDestroyed() should return false.

    4. FragmentTransaction#commit can fail if onSaveInstanceState has been called. java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

      Why - This can happen in the wild where say right before FragmentTransaction#commit executes, the user gets a phone call and your activity is backgrounded and paused. How to trigger manually - The easiest way to manually trigger this behavior is to call Activity#onSaveInstanceState in your uncommitted code right before the call to FragmentTransaction#commit Fix 1 - call FragmentTransaction#commitAllowingStateLoss but that implies that your fragment would be in a different state then the user expects it to be. Fix 2 - The better way is to ensure that the code path L which leads to FragmentTransaction#commit is not invoked once Activity's onSaveInstanceState has been called but that's not always easy to do.

    5. FragmentManager is null after Activity is destroyed. java.lang.NullPointerException: ... at getSupportFragmentManager().beginTransaction()

      Why - this can happen when the activity has been destroyed before getSupportFragmentManager() is invoked. The common cause of this is when a new fragment has to be added in response to a user action and the user immediately backgrounds the app, again, say due to a phone call, after clicking the button before getSupportFragmentManager() is invoked. Another common case is where an AsyncTask which will call getSupportFragmentManager() in onPostExecute and while the task is engaged in the background processing (doInBackground), the activity is destroyed. how to trigger manually - call Activity#finish() before getSupportFragmentManager().beginTransaction()

      Fix 1 - If getSupportFragmentManager() is being invoked in the Activity, check if it's null. If it is being invoked inside a Fragment check if isAdded() of the Fragment returns true before calling this.

    6. Avoid UI modifications which are not related to a FragmentTransaction with FragmentTransaction committed using commitAllowStateLoss

      Why - Any UI modifications like modifications of the text in a TextView are synchronous while the execution of a FragmentTransaction via FragmentTransaction#commitAllowStateLoss() is asynchronous. If the activity's onSaveInstanceState is invoked after the UI changes have been made but before commitAllowStateLoss is called then the user can end up seeing a UI state which you never expected them to see. Fix - use commitNow or hook into FragmentManager.FragmentLifecycleCallbacks#onFragmentAttached(). I will admit this I haven't found a simpler fix for this. And this issue is definitely an edge case.

    7. Saving Fragment State

      As mentioned earlier, a Fragment is re-created on activity recreation by FragmentManager which will invoke it's default no-parameter constructor. If you have no such contructor then on Fragment recreation, the app will crash with java.lang.InstantiationException: MyFragment has no zero argument constructor. If you try to fix this by adding a no argument constructor then the app will not crash but on activity recreation say due to screen rotation, the Fragment will lose its state. The right way to serialize a Fragment's state is to pass arguments in a Bundle via setArguments

      MyFragment myFragment = new MyFragment(); myFragment.setArguments(mBundle); return myFragment; The Fragment code should then use getArguments() method to fetch the arguments. Infact, I would recommend a Builder pattern to hide all this complexity.

      Consider this complete example,

      ``` public class MyFragment {

      private static final String KEY_NAME = "name"; public static class MyFragment.Builder { private final Bundle mBundle = new Bundle(); public Builder setName(String username) { mBundle.putInt(KEY_NAME, clickCount); return this; } public MyFragment build() { MyFragment myFragment = new MyFragment(); // Set the username myFragment.setArguments(mBundle); return myFragment; } } public MyFragment() { // Get the user name @Nullable String username = getArguments() != null ? getArguments().getString(KEY_NAME, null) : null; } 

      }

      if (!isDestroyed()) { // Create the Fragment MyFragment myFragment = new MyFragment().Builder().setName(username).build(); // Add the Fragment FragmentTransaction ft = getSupportFragmentManager().beingTransaction(); ft.add(myFragment); ft.commitNowAllowingStateLoss(); } ```

    8. Callbacks To callback into the parent activity/fragment in case of an action inside your Fragment, say, a user click, provide an interface (MyFragmentListener) which the holding activity/Fragment should implement. In Fragment#onCreateView() get the host via getHost(), cast it to MyFragmentListener, and store it in the instance variable of your Fragment class. Set that instance variable to null in Fragment#onDestroyView(). Now, you can invoke callbacks on this MyFragmentListener instance variable.

    9. Backstack Backstack is nuanced and my grasp of it is still limited. What I do understand is that if you want your Fragment to "react" to the back key press then you should call FragmentTransaction#addToBackStack(backStackStateName) while adding the Fragment via FragmentTransaction and remove it while removing it. Removal from backstack is a bit more nuanced. (EDIT: Manual removal from backstack is not required in Activity#onBackPressed() as long as your Activity inherits from FragmentActivity)

      SupportFragmentManager manager = getSupportFragmentManager(); FragmentManager.BackStackEntry entry = manager.getBackStackEntryAt(manager.getBackStackEntryCount() - 1); if (backStackStateName.equals(entry.getName())) { manager.popBackStack(backStackStateName, FragmentManager.POP_BACK_STACK_INCLUSIVE); }

    10. Inside your Fragment code, if you want to decide whether it is safe to execute a UI code or not, rely on isAdded(), if it returns true, it is safe to perform UI modifications, if it returns false, then your Fragment has been detached from the activity either because it has been removed or because the host (Fragment/Activity) is being destroyed.

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

    What you do when your app don't get downloads?

    Posted: 30 Jul 2018 06:49 AM PDT

    Learn how to make a two pane layout.

    Posted: 30 Jul 2018 09:19 AM PDT

    idée - write it down, before you forget [beta] [opensource]

    Posted: 30 Jul 2018 08:26 AM PDT

    We come up with interesting ideas every day and they are spread across every possible notes app. This is a dedicated app for writing down your ideas.

    Use it to write down ideas for starting your own company, to create a bucket list or personal goals.

    Separate good ideas from the bad ones by sorting them via ease and confidence of execution, and how powerful the idea is.

    The app is in BETA, we want to hear your feedback and suit it to your needs!

    Get Early Access - idee.mindhouse.io

    Take a look at the code at Github

    submitted by /u/krisu-pl
    [link] [comments]

    Is there anything that automatically adds cover art to songs?

    Posted: 30 Jul 2018 03:48 PM PDT

    Ok so i dont know if this is sven possible but is there anything that can see the name of a song i have and then find the appropriate album art for it via the internet? I just downloaded 140 songs and they dont have any art, it sounds stupid but is there anything that can do it automatically?

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

    What's the official name for emoji/sticker/whatever attachment-picker?

    Posted: 30 Jul 2018 03:44 PM PDT

    I'm running LineageOS 15.1 (Android 8.1). When I run the default "Messenger" app & hit the paperclip icon to the left of the "Send Message" textarea, a small bar pops up above the back/home/recent button bar that (currently) has 4 square monochrome icons... a camera (launches the camera app), a picture (launches the gallery app), a musical note (launches a picker for music files), and a microphone (which records voice messages).

    Is this something that's just hardcoded into the app, or is this a new(-ish) addition to Android that allows an app to register itself as something like an "attachment-picker" (presumably, for some specific MIME-type) & provide an icon to Android, so unrelated apps can then automatically add it to their bar like the one in the Messenger app?

    If it's a new(-ish) addition to Android, what's it officially called, and/or where does Google document it?

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

    Does any of your customers complain home widget is no longer working in Android O?

    Posted: 30 Jul 2018 02:37 PM PDT

    Hi, I have received several complains from customers, where the home widget is no longer working in Android O. However, I'm not able to reproduce the problem myself after several tries. I'm using Android One phone.

    I search around the web, but still cannot figure out why.

    https://forums.androidcentral.com/ask-question/791821-google-news-weather-widget-doesnt-update-automatically.html

    https://www.reddit.com/r/RobinHood/comments/8adofe/android_oreo_widget_broken/

    I was wondering, does anyone of you face the same problem? May I know what exactly is the root cause, and how should we solve it? Thanks.

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

    ASC android developer

    Posted: 30 Jul 2018 02:08 PM PDT

    Does anyone know if the exam is in java or kotlin ?

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

    Google Play Console App Releases page down?

    Posted: 30 Jul 2018 07:55 AM PDT

    Wondering if anyone else is seeing the same red bar at the top of the window:

    "An unexpected error occurred. Please try again later. [97610910]"

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

    Full Source Code for 2 New RICOH THETA Plug-ins (Android apps) Available Now

    Posted: 30 Jul 2018 11:10 AM PDT

    Considering integrating 360° tech into your next product? The Android-based RICOH THETA 360° camera allows installing your plug-in (Android app) inside the camera to fully customize functionality.

    Full source code is available for 2 new RICOH THETA plug-ins: File Cloud Upload and Wireless Live Streaming. Check out the free theta360.guide Developer Guide for details.

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

    What programming language do I need to make Android Apps?

    Posted: 30 Jul 2018 11:09 AM PDT

    I want to start making Android apps. I'm familiar with Java, but read somewhere that Google is moving to Kotlin for Android apps. Should I stick with Java or learn Kotlin. Thanks.

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

    Safe sync for Google Drive to Android

    Posted: 30 Jul 2018 10:29 AM PDT

    A big mistake was synced every entry of my notebook was deleted...

    I just brought the drive sync from Metal Ctrl, i like the app. But I need to pair two sync methods for one folder pair! I want a complete sync. Updated and new files uploaded, as well all new and updated downloaded. BUT NOT delete any files. I gonna do this Manually. So just a file up and download and update. Please help me!

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

    Kin Developer Program

    Posted: 30 Jul 2018 09:59 AM PDT

    [Tech Talks] Conference for Kotliners @ Budapest 2018

    Posted: 29 Jul 2018 06:43 PM PDT

    Question about the design and coloring an application!

    Posted: 30 Jul 2018 08:57 AM PDT

    Hi guys, I have a question bothering me. To begin with, I'm not a developer, and not even a designer. But, recently I got an interesting (at least for me) question it. Let's say that we have groups of apps:

    • Business apps
    • Fitness apps
    • Money management apps
    • Text processors, readers, etc.
    • Messengers, social networks clients

    Aight, that's enough. Could it possibly be that each gorup of applications has its own preferable coloring pattern and design? Maybe I'm wrong, but in my mind each group associates with some colors:

    • Business app - light pale colors
    • Money management - greenish colors
    • Social networks clients and messangers - something bright and warm
    • Etc.

    I'm pretty sure i am wrong, but still. Could it be that users are more comfortable with applications that repeating coloring patterns that are associating with a specific group?

    submitted by /u/-V01D
    [link] [comments]

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel