• Breaking News

    [Android][timeline][#f39c12]

    Sunday, May 12, 2019

    Did Kotlin really reduce your crash rate? Android Dev

    Did Kotlin really reduce your crash rate? Android Dev


    Did Kotlin really reduce your crash rate?

    Posted: 12 May 2019 09:03 AM PDT

    So I'm working with a start-up which haven't really moved to Kotlin or Arch-Components because of the learning curve. They really like to ship 1-2 features every week, and is proud of it. Because if this fast paced development, we often encounter lots of NPEs and often we end up removing or replacing lot's of existing features as well. I'm trying to push this among the team to start using Kotlin. But I wanted to know to know does Kotlin actually reduce the number of NPEs that you were seeing? How did it affect your time taken for development? Also, can you guys help me out on how do I push it forward among my team?

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

    [Fabric] Announcing major updates to our roadmap and migration timeline

    Posted: 12 May 2019 09:53 AM PDT

    What exactly does "Kotlin-first" mean?

    Posted: 12 May 2019 12:43 PM PDT

    Kotlin and Java are 100% interoperable, right? So why does the official Android Developers blog state

    "Many new Jetpack APIs and features will be offered first in Kotlin."

    What hinders me from using them from Java?

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

    If Else hell for your apps settings

    Posted: 12 May 2019 03:19 PM PDT

    I just finished watching this presentation and I read a few articles on Settings and so far everything makes sense, I understand how and why you would use Preferences to handle your settings. But there's one thing no one seems to be mentioning.

    Say I have a switch and throughout my app I want to perform different actions depending on the state of that switch. Do I just wrap EVERYTHING in a bunch of if else statements?!

    This is what I'm thinking

    val sharedPrefs = getSharedPrefs() val switch = sharedPrefs.get(SWITCH) if(switch){ }else{ } 

    Is there a better solution or am I asking a dumb question...

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

    Build Bigger, Better: Gradle for Large Projects (Google I/O'19) - YouTube

    Posted: 11 May 2019 07:52 PM PDT

    Firestore + RecyclerView Master Detail

    Posted: 12 May 2019 02:43 PM PDT

    I currently have a RecyclerView that is being populated by Firestore and I am curious as to how to best implement a Detail view. I have not found any good tutorials (perhaps I am googling the wrong thing, haha) on how to do this. I want it so when a user clicks on an item in the RecyclerView, it should then open another Fragment which displays more information on that particular Firestore item. I would think you would need to set a click listener on the holder inside the Adapter. Here is what I currently have inside my onBindViewHolder method:

     holder.mView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText((Context)mListener, mValues.get(position).getUserFirstName(), Toast.LENGTH_SHORT).show(); } }); 

    My current line of thinking is I would need to get the data from the clicked item in the code above and then send that data to another fragment. Once there, I could receive an Intent and use it to populate the view. Has anyone done something similar with Firestore before?

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

    How to Create MultipleTable?

    Posted: 12 May 2019 04:07 PM PDT

    Please help me if you know.. How can I create multiple table în SQLite linked to each other by foreign key.. I have to create classes? For example i want a User table and a Income table.. I need to have a class for each of them? I searched în YouTube ofc but i don t really understand.. Please help and thank you.

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

    Android Studio Layout Preview not showing properly

    Posted: 12 May 2019 06:58 AM PDT

    Hey guys,

    I'm pretty new to Android Studio and got the following problem:

    This is how my layout is shown in the preview screen. Notice the blurry "Log In" button. "Get help signing in." and "Sign up." should also be displayed bold.

    https://www.dropbox.com/s/6mqmk1g98wi2kyr/Bildschirmfoto%202019-05-12%20um%2015.50.51.png?dl=0

    And this is how it is properly shown on a device.

    https://www.dropbox.com/s/295p2q4rfkqrctc/Bildschirmfoto%202019-05-12%20um%2015.53.15.png?dl=0

    What can I do to let Android Studio show my layout also in the preview screen properly? Again, the final design is displayed correctly on the device, just not in the preview screen. Thanks in advance for your help guys.

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

    How to make sense of Android Studio's error logs?

    Posted: 12 May 2019 06:35 AM PDT

    My knowledge of AS error logs is limited to looking for the blue link in the big red wall of text to see the problematic piece of code. I ignore everything else in the logcat, and it makes me feel very incompetent.

    Problem is that the logcat is ridiculously long, and most errors give nothing when I google them. Things like " E/MotionRecognitionService: handleMessage: event 200 value : 1 ", " E/libpersona: scanKnoxPersonas ", or "E/msgr.MessengerNotificationChannelHelper: Failed to pase the JSON object for org.json.JSONException: End of input at character 0" bring no usable results.

    Here is my error logs and most of it is ungoogleable.

    Is the logcat even MEANT to be understood?

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

    Sometimes CountdownTimer does not work?!

    Posted: 12 May 2019 11:44 AM PDT

    Hello everybody,

    i have created a little app which also has a CountDownTimer. Sometimes it works sometimes it buggs around. I dont get it.

    How it should work (and mostly does):

    After the user pressed the start button the timer starts and counts down. After the time is finished it sends a notification and rings the alarm. Both should also happen if the app is in the background or the phone sleeps. Most of the time it does exactly that. But sometimes:

    What sometimes happens:

    Nothing happens. After reopening the App the notification appears and the ring tone starts.

    I dont get it why it happens sometimes. Can somebody explain that to me?

    The code:

    private void startTimer() {
    countDownTimer = new CountDownTimer(timeLeftInMillis, 1000) {
    @Override
    public void onTick(long millisUntilFinished) {
    timeLeftInMillis = millisUntilFinished;
    updateCountDownText();
    }

    @Override
    public void onFinish() {
    isTimerRunning = false;
    btn_start.setText(getResources().getString(R.string.btn_timer_start));
    Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
    ringtone = RingtoneManager.getRingtone(getApplicationContext(), notification);
    ringtone.play();
    isRingtonePlaying = true;
    btn_start.setText(getResources().getString(R.string.btn_stop_ring));
    NotificationHelper.createNotification(getResources().getString(R.string.notification_title), getResources().getString(R.string.notification_desc), getApplicationContext());
    calcTemp();
    }
    }.start();
    isTimerRunning = true;
    btn_start.setText(getResources().getString(R.string.btn_timer_end));
    }

    private void stopTimer() {

    if(isTimerRunning) {
    countDownTimer.cancel();
    isTimerRunning = false;
    btn_start.setText(getResources().getString(R.string.btn_timer_start));
    calcTemp();
    }
    }

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

    Google Play Store testing feature to suggest unused apps to uninstall.

    Posted: 12 May 2019 12:08 AM PDT

    Room query delete specific value

    Posted: 12 May 2019 11:12 AM PDT

    Basically looking for a query like this:

     @Query("FROM my_data_table DELETE someString WHERE someString == string") fun deleteItem(string: String): Completable 

    Got this feeling in the back of my head that I'm taking the wrong approach, what should I be doing instead? Or how can I write that query above?

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

    How to get notified about remote new data?

    Posted: 12 May 2019 11:11 AM PDT

    Hi, everyone. I'm new to Android and I'm working on a pretty simple app. It has a bottom navigation view, a single activity and a few fragments for displaying data using recycler view. I'm using ViewModels to carry the LiveData around, so far so good. I'm using the Firebase Firestore free plan for remote database. To retrieve the data, I'm doing this:

    • When the app starts, try to read from internal storage
    • If that's empty (first time using the app, for example)
      • Read from Firebase
      • Save it to internal storage
      • Update the LiveData object being observed

    The information will not be updated more than once or twice every two weeks or so.

    My problem is, after the user has stuff in the internal storage, how can I know when there is new data in Firebase that should be updated locally? The app is reading from the local cache, so it will not reach out to the remote server to fetch data.

    I was able to at least circumvent this by adding a SnapshotListener, which does precisely what I need, but it so happens that the free plan only allows me 100 simultaneous connections, and from what I understood, having this Listener will count as one during the whole time an user has the app open, meaning that using this approach only 100 people could open the app at any given time.

    Is the overall approach I'm using valid? Is there another way for me to send a "nudge" so the app knows that the cache data is stale and it should fetch from Firebase?

    Thanks!

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

    Help in finding the library

    Posted: 12 May 2019 10:57 AM PDT

    Sometimes i see apps. When app launches first time they show an overlay above their important features to guide the user. When user click on that feature then that overlay disappears.

    I don't know if it is a library already made or i have to implement it myself.

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

    How to automatically list all the used open source libraries?

    Posted: 11 May 2019 10:57 PM PDT

    I have tried the following libraries to list all the used open source libraries in my app

    https://github.com/google/play-services-plugins/tree/master/oss-licenses-plugin

    https://github.com/mikepenz/AboutLibraries

    However, both of them fail to show all the dependencies. The first one shows most but is still missing a lot.

    Thanks for you help.

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

    Suggest me some best androdev free tutorial.(java)

    Posted: 12 May 2019 10:27 AM PDT

    Hey there, I'm new to android application development.. I'm looking for nice-beginner-friendly-effective tutorials.. So help me guys!

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

    Android Studio beta

    Posted: 12 May 2019 10:22 AM PDT

    How to get the beta version of Android Studio Installed. I already have the latest stable version, but am not able to find the beta version for trying it out.

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

    Android apk lag problem

    Posted: 12 May 2019 09:50 AM PDT

    Hello I have published an android game in google play, in runs perfect on my device (Samsung galaxy S8), but the people I asked for to tested it says that it lags heavely, another user with the same device as mine doesn´t have lag issues. I assume it is because my project has a compatibility problem.

    Here is a link to the apk in play store. Search on your phone as "Rangin" https://play.google.com/store/apps/details?id=com.DualDot.Rangin

    Here is a shot of my config. https://imgur.com/a/8p6A6fZ  I have tried to change the build system to internal and the run device to all compatible devices and doesn't solve the problem.

    This is an error code that pronts every time I finish building, doesnt seem to affect the apk.

    Assertion failed: Assertion failed on expression: 'ptr == NULL || !HAS_ROOT_REFERENCE(GET_CURRENT_ALLOC_ROOT_REFERENCE()) || GET_CURRENT_ALLOC_ROOT_REFERENCE() == GET_ROOT_REFERENCE(s_MonoDomainContainer, kMemMono)' UnityEngine.GUIUtilityrocessEvent(Int32, IntPtr)

    I don't know what to do, I'm desperate, help pls

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

    Why does AS not default to Android 1.8?

    Posted: 12 May 2019 09:39 AM PDT

    I meant JAVA 1.8! I'm assuming it's because it isn't fully supported yet?

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

    Question about a very simple app that shows a notification

    Posted: 12 May 2019 09:16 AM PDT

    I have some code that's running on a Pi. The code is monitoring something, which can be true or false. I want a notification on my Android phone when that condition is true, and I want to remove that notification when it's false. Ideas how to achieve this with the least amount of work? (email doesn't work due to the second part - no way to remove the notification)

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

    Big security problem in closed source library, what can I do?

    Posted: 12 May 2019 03:14 AM PDT

    I posted before about a different problem with the same library in the Weekly thread but I think that this requires its own post. I'm a beginner with Android development and I have to make a payment system that uses an external terminal to read credit cards. (I don't know if I can say the name, if anyone wants to know just ask in the comments). That terminal is managed with its Android library that handles everything (I send a payment request and it returns me the transaction id basically).

    Even though I'm a beginner, I'm concerned a lot for security, passwords etc. etc. I encrypt everything that could be a security risk if leaked, everything is salted and stored in SharedPreferences.

    The library I have to use has its own login form, that stores email and password by itself with a similar system in a shared preferences xml file.

    The only problem is that the developers of that library did basically nothing for security. The email is stored non ecrypted. The password is a plain SHA256 hash with no salt. I was able to copy that hash, put it on a website and receive the original password back. I don't know what they do with the unsalted hash to login to their server though.

    Everyone who knows about this could get your phone, steal the shared preferences file with an Android security exploit, root or other ways I don't know about and empty your bank account with a few clicks.

    Would you consider this a security problem?

    I tried to get in touch with the library developers about this problem and a constant memory leak everytime their login form activity closes but I haven't received a response yet. I don't think that I can do anything else, because their library is closed source, the Github page contains only an example app.

    Just so you know, I could find the same unencrypted file on their default/example app on the Play Store.

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

    Looking for a susbtitute to FusedLocationApi

    Posted: 12 May 2019 10:52 AM PDT

    Im new to Android programming so if this is easy Im sorry.

    Im trying to make google maps work on my app but to be honest, Im trully lost, please help me :(

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

    Open New Activity By Clicking Button - Android Development For Beginners Part 1

    Posted: 12 May 2019 06:10 AM PDT

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel