Seenthis
•
 
Identifiants personnels
  • [mot de passe oublié ?]

 
  • #k
  • #ko
RSS: #kotlin

#kotlin

  • #kotlin-dsl
  • #kotlin-spring
  • #kotlin-beginners
  • #kotlin-and-nodejs
  • @nicolasm
    Nicolas🌱 @nicolasm CC BY-SA 7/06/2025

    Revanced Manager
    Application pour patcher des app #android (apk), en général pour enlever de la #pub et/ou accéder aux fonctionnalités premium.
    ▻https://revanced.app
    Marche pour youtube, et autre.
    Un bon pendant à Firefox/ublock origin mais pour le téléphone portable ...

    #antipub

    Nicolas🌱 @nicolasm CC BY-SA
    • @nicolasm
      Nicolas🌱 @nicolasm CC BY-SA 7/06/2025

      Un repo non officiel qui contient un patch qui désactive les principaux mécanismes de pubs. Seulement testé sur un app mais ça a marché
      ▻https://github.com/jkennethcarino/privacy-revanced-patches
      (il suffit de changer l’adresse du repo sur le renvanced manager)

      Nicolas🌱 @nicolasm CC BY-SA
    • @nicolasm
      Nicolas🌱 @nicolasm CC BY-SA 7/06/2025

      Et de manière plus générale, si tu t’y connais un peu en dev, y a moyen d’écrire tes propres patches et patcher les app android que tu utilises pour supprimer/modifier/ajouter des fonctionnalités.
      En gros ça fonctionne avec un « fingerprint » qui va identifier une méthode, et une méthode qui va modifier ce que l’empreinte à trouver, en modifiant du bytecode en Dalvik. Le tout écrit en #kotlin.

      Nicolas🌱 @nicolasm CC BY-SA
    Écrire un commentaire
  • @arno
    ARNO* @arno ART LIBRE 11/10/2019

    Hello Seenthis, y’a des gens qui font du #Kotlin, ici ?

    ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 11/10/2019

      Je cherche une doc claire et bien faite, considérée comme fiable, pour savoir comment on fait, en Kotlin, pour télécharger un fichier sur le Web et le sauvegarder en local.

      Ça me semblait une question toute con, mais alors vraiment, je pars là-dedans sur Stack Overflow, et c’est proprement n’importe quoi.

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 14/10/2019

      A priori, en passant par Okhttp:

          fun downloadFileAsync(downloadUrl: String) {
              val client = OkHttpClient()
              val request = Request.Builder().url(downloadUrl).build()
      
              client.newCall(request).enqueue(object : Callback {
                  override fun onFailure(call: Call, e: IOException) {
                      e.printStackTrace()
                  }
                  override fun onResponse(call: Call, response: Response) {
                      val fos = FileOutputStream("d:/tmp.txt")
                      fos.write(response.body?.bytes())
                      fos.close()
                  }
              })
          }

      Pour le téléchargement, ça je sais que ça fonctionne, je l’ai déjà utilisé pour récupérer un fichier JSON distant ; en revanche, la partie sauvegarde en local, pas encore testé.

      La page suivante donne aussi un exemple pour faire le téléchargement de manière synchrone (je ne sais pas dans quel cas ce serait utile, mais au cas où…) :
      ▻https://howtoprogram.xyz/2016/11/17/download-a-file-with-okhttp

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 14/10/2019

      La doc officielle pour sauvegarder un fichier en local :
      ▻https://developer.android.com/training/data-storage/files/internal

      Il y a même ce que je cherche : sauvegarder un fichier de cache (que le système peut effacer lui-même s’il manque de place) :

      // For a more secure solution, use EncryptedFile from the Security library
      // instead of File.
      private fun getTempFile(context: Context, url: String): File? =
              Uri.parse(url)?.lastPathSegment?.let { filename ->
                  File.createTempFile(filename, null, context.cacheDir)
              }

      Et après (un assez long moment) : non c’est pas vraiment utilisable en l’état (bon sang de doc de merde).

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 14/10/2019

      Pour commencer : obtenir l’autorisation d’accéder à la caméra :
      ▻https://android.jlelse.eu/create-an-android-camera-app-using-kotlin-459543cec5a7

      ARNO* @arno ART LIBRE
    Écrire un commentaire
  • @arno
    ARNO* @arno ART LIBRE 8/10/2019

    #android #kotlin - WebView example
    ▻https://android--code.blogspot.com/2018/03/android-kotlin-webview-example.html

    Plein de configurations pour une webview sous Android.

    ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 10/10/2019

      Je continue avec Kotlin, là j’ai besoin de jouer avec #ARCore. Cette page explique comment ajouter des images de référence :
      ▻https://medium.com/dvt-engineering/getting-started-augmented-reality-using-android-arcore-9c2f4c3d6528

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 10/10/2019

      Pour ARCore, la page officielle pour activer le truc :
      ▻https://developers.google.com/ar/develop/c/enable-arcore

      Il me manquait la déclaration qui va bien dans AndroidManifest.xml :

       <meta-data android:name="com.google.ar.core" android:value="optional" />

      (Ici : ARCore est optionnel.)

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 10/10/2019

      Communication entre la Webview et l’application :
      ▻https://medium.com/@elye.project/making-android-interacting-with-web-app-921be14f99d8

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 11/10/2019

      Je me le note, parce que j’ai bien galéré avec ça : pour accéder à ma webview depuis un autre thread (parce que déclenchement d’une action asynchrone par une @JavascriptInterface), il faut déclarer runOnUiThead :

      runOnUiThread {
              //execute code on main thread
              myView.evaluateJavascript("…", null )
      }
      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 15/10/2019

      Du Kotlin un peu plus complet pour ajouter des images de référence à une session ArCore :
      ▻https://github.com/kboy-silvergym/ARCore-Kotlin-Sampler/blob/master/app/src/main/java/net/kboy/sceneformsample/activity/ImageActivity.kt

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 17/10/2019

      Pour l’instant, la seule documentation fiable que j’ai trouvé sur #ArCore en #Kotlin, c’est là :
      ▻https://proandroiddev.com/building-arcore-apps-using-sceneform-part-3-4cd392d6284f

      et le code source :
      ▻https://github.com/Hariofspades/SpreadLove

      ARNO* @arno ART LIBRE
    • @arno
      ARNO* @arno ART LIBRE 17/10/2019

      A l’ajout d’un <fragment> pour AR dans mon XML, plantage systématique de l’app. Il faut ajouter les compileOptions suivantes dans les crochets de android{} dans le fichier build.gradle :

      android {
          compileOptions {
              sourceCompatibility JavaVersion.VERSION_1_8
              targetCompatibility JavaVersion.VERSION_1_8
          }
      }

      (les gens sur l’interwebz présupposent que je savais qu’il fallait installer ça dans dans android{}).

      ARNO* @arno ART LIBRE
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 14/04/2019

    How and What to Develop with #corda
    ▻https://hackernoon.com/how-and-what-to-develop-with-corda-d2a3ecba0dfb?source=rss----3a8144eabf

    https://cdn-images-1.medium.com/max/1024/1*SfOX21aJBDRhTX7G6YJFcA.png

    This is an updated version of the Developing with Corda post that I wrote last year. Since then quite a lot has changed, but from your perspective, as a developer, it should feel very similar. Corda has changed a lot to increase its performance, improve security and provide a better developer experience. Touching on the last point, improving the developer experience requires adding better functionality while removing less desirable parts. But, to do so while maintaining backwards compatibility allows you to go through the process of working with Corda 3 to 4 come with little issues. That being said, there are a few differences. These are the things that will be highlighted throughout this post while mainly focusing on providing a base for any newer Corda developers reading this.If you (...)

    #blockchain #distributed-ledgers #kotlin #dlt

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 27/03/2019

    #cross-platform? We Don’t Say That Around Here Anymore
    ▻https://hackernoon.com/cross-platform-we-dont-say-that-around-here-anymore-cd269fcd4a5b?source=

    https://cdn-images-1.medium.com/max/1024/1*bZxhO51kvBYTsxur2xiJ-A.png

    “Cross-platform” is a loaded termTouchlab is a mobile innovation consultancy with #kotlin Multiplatform expertise.This is the 1st post in a 2 post series.Post 2: “The Future of Cross-Platform is Native” by Touchlab Director of Project Strategy, Justin Mancinelli.If you’re interested in learning more, we’re hosting a Kotlin Multiplatform webinar on Thursday, March 28th, 1–2 PM EST. You can register here.In the application development world, you hear the term cross-platform all the time. The idea of “write once, run anywhere” is like an unreachable promised land for management stakeholders, and an unrealistic and frustrating reality for developers.At Touchlab, we don’t use the term cross-platform. We prefer “multiplatform” — for a couple of important reasons.BaggageFirst, cross-platform has a lot of (...)

    #mobile-app-development #entrepreneurship #product-management

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 22/03/2019

    Writing a #graphql #dsl in #kotlin
    ▻https://hackernoon.com/writing-a-graphql-dsl-in-kotlin-4a74e55e2c49?source=rss----3a8144eabfe3-

    https://cdn-images-1.medium.com/max/1000/1*YL-fQhGhBPAti9tX5kMd4A.png

    Writing a GraphQL Domain Specific Language (DSL) in KotlinI’ve recently spent some time testing a GraphQL endpoint against a few queries. At the moment I’m keeping my queries as multi-line strings but I was wondering:How hard would it be to build a GraphQL query DSL in Kotlin?I thought this could be a good opportunity to become more familiar with Kotlin DSL capabilities.Here’s what I’ve got so far.A GraphQL DSL in KotlinThe above snippet produces the following result:The GraphQL resulting from the DSLThe main challenges I have faced up to this point have been around supporting:any string to be used as the root field of the query (e.g."allUsers")nested selection of fieldsa map-like syntax for field arguments (I’ve settled for the to method for now)Any String is a FieldAs you can see (...)

    #string-literal #kotlin-dsl

    • #DSL
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 28/02/2019

    Don’t be afraid (of #kotlin)
    ▻https://hackernoon.com/dont-be-afraid-of-kotlin-38dc53144b6b?source=rss----3a8144eabfe3---4

    https://cdn-images-1.medium.com/max/1024/1*YCUV1QTTjXIeSgtNv5hTFA.jpeg

    Intergalactic expert summitIf you are a #java developer, you probably heard of Kotlin: a language that conquered a lot of territory in a short amount of time. By now we can say: Kotlin is here to stay. It looks like it will be the JVM language №2 and on Android, it became for many of us the language of choice.But not everyone is excited. If you are a long time Java developer, you might be worried about all of this.The mythSome people say that developers should learn a new language every two years, that we should spend our spare time to code on hobby projects!I never really did this, and I know a lot of developers don’t do either.To be honest, there are many reasons why you should look outside of your own programming world. Learning a new language helps you to become better in your main (...)

    #fear-of-failure #learning-to-code #change-management

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 18/02/2019

    How Can Hierarchical Test Structure Absolutely Make a Mess?
    ▻https://hackernoon.com/how-can-hierarchical-test-structure-absolutely-make-a-mess-f72f47b5bf57?

    https://cdn-images-1.medium.com/max/1024/1*G83x_di2BQjDzQIh4zGTrA.jpeg

    source: pexelsHave you ever written your unit tests using a simple xUnit style #testing framework?Then you probably know, as tests get more complex, the more boilerplate and duplication they collect, either spread among the test methods, or setup functions.Now, hierarchical context frameworks are pretty robust to mitigate this boilerplate problem and remove this duplication. They allow you to have nested contexts each one having their own little bit of setup, and “inheriting” the setup of parent contexts.This way, you can express lots of different scenarios without actually repeating yourself even once in the test setup code.Great, isn’t it?Now, what if I told you that hierarchical test structure can cause more subtle duplication (that it was supposed to prevent in the first place) that is (...)

    #kotlin #tech #technology #development

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 8/02/2019

    Sudokus and Schedules
    ▻https://hackernoon.com/sudokus-and-schedules-4b4693b07c2b?source=rss----3a8144eabfe3---4

    https://cdn-images-1.medium.com/max/800/0*qmQYsvJfr5KB1pwf.jpg

    Solving Scheduling Problems with Tree SearchPan Am’s Reservation Center in the 1950’sMachine learning is quite the rage these days, so much it is easy to lose sight of the fact there are other #algorithms in the “AI” space. As a matter of fact, these algorithms can be so crucial that it can be neglectful to overlook them.▻https://medium.com/media/5cdb4af8e1b955a096783fc3814f3114/hrefImagine you needed to schedule classes and classrooms. There are 36 periods, 36 rooms, and 800 lectures as your dimensions to schedule against. Want to take a guess how many possible configurations there are? Here is the answer: 1⁰²⁴⁹⁰ possible configurations. To put it in perspective, there are 1⁰⁸⁰ observable atoms in the universe. Even a task as mundane as classroom scheduling deals with astronomical numbers and (...)

    #sudokus-and-schedules #machine-learning #artificial-intelligence #kotlin

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 22/01/2019

    Learn Why These 5 Popular Startups Rewrote Their Android Apps From #java to #kotlin
    ▻https://hackernoon.com/learn-why-these-5-popular-startups-rewrote-their-android-apps-from-java-

    https://cdn-images-1.medium.com/max/1000/1*qWV7EibigiTkesTL8DS_ow.jpeg

    and Why You Should Too!Image Credit — Zealous SystemEver since Google made Kotlin as the official language for Android, there is one question we’ve been asked at least one-hundred times!“Should we move from Java to Kotlin?”To this, we always ask a counter question — do you know what Kotlin offers?Because knowing all the details automatically answers the former question — whether you should shift from Java to Kotlin or not.However, if you don’t know anything about Kotlin and would like find out whether you should migrate from Java to Kotlin, just read the entire article.In this article, we’ll be looking at 5 famous startups that have adopted Kotlin and explore whether it’s worth to follow their lead or not.Here are the 5 Famous Startups’ Android Apps That Were Either Made Using Kotlin or Migrated from Java (...)

    #android-app-developers #android-app-development #java-to-kotlin

    • #Google
    • #Android
    • #android
    • #Java
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 11/01/2019

    Why And How We Built a Temporal #database System Called SirixDB (Open Source) From Scratch
    ▻https://hackernoon.com/why-and-how-we-built-a-temporal-database-system-called-sirixdb-open-sour

    https://cdn-images-1.medium.com/max/628/1*j8pCR0heKRznTIuwCA1chA.png

    Pushing Database Versioning to Its Limits by Means of a Novel Sliding Snapshot Algorithm and Efficient Time Travel QueriesAs most current database systems still simply store current state or past states within one big relational table, we investigated what the performance drivers are and how to improve on the current state-of-the-art. We implemented an Open Source storage system called Sirix(.io) from scratch, which stores small sized snapshots as well as supports sophisticated time-travel queries, while competing with the efficiency of non-temporal database systems.Sunbirst view of a resource stored in Sirix (showing file system data)What is a temporal database system?It is a term used to describe, that a system is capable of retrieving past states of your data. Typically a temporal database (...)

    #open-source #java #software-development #kotlin

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 9/01/2019

    #kotlin-Spring Boot : Gotchas
    ▻https://hackernoon.com/kotlin-spring-boot-gotchas-e267be7ec022?source=rss----3a8144eabfe3---4

    https://cdn-images-1.medium.com/max/1024/1*335G-wr9wfI3LlBYgndkLw.png

    It’s been around 6 months since we adopted Kotlin for our backend services at the company I currently work at. We’ve been migrating an existing java #spring boot service to Kotlin.Our experience with Kotlin has been mostly great. But sometimes it does feel like Spring was retrofitted to support Kotlin.There’s the basic issues like :Spring requires classes with annotations to be open, all classes in Kotlin are closed by default. This can be resolved by adding the kotlin-spring plugin to the gradle config.Hibernate entities require a no-arg constructor, Kotlin has provided a compiler plugin kotlin-jpa to generate an additional zero-argument constructor for classes.It is important to note that these issues have been identified and the project is generated using start.spring.io have these plugins (...)

    #lessons-learned #software-development #spring-boot

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 9/01/2019

    How Plato Delivers Mobile News Feed Content using a Headless CMS
    ▻https://hackernoon.com/how-plato-delivers-mobile-news-feed-content-using-a-headless-cms-9065305

    https://cdn-images-1.medium.com/max/400/1*LqWnkhIfG4K9I1ygQT5eXg.jpeg

    Plato’s mission is to bring people together through meaningful & social games. Plato combines chat & games seamlessly, as the first messenger built from the ground up to support full multiplayer games. With a team comprised of Yahoo! and gaming veterans, plus backing from WhatsApp, Plato is available now on iOS & Android.Plato had a home-built CMS that, between operational costs and the engineering salaries to maintain it, was costing far too much. The team decided to replace their internal system with Cosmic JS to allow their developers to build new content models when they need to while empowering editors to manage content without bottlenecking the development team.Plato’s new tech stack is #golang-based and hosted on AWS. Plato’s mobile clients, written in #swift and #kotlin, (...)

    #mobile-news-feed-content #web-development

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 3/12/2018

    Why You Should Use Class #delegation In #kotlin
    ▻https://hackernoon.com/why-you-should-use-class-delegation-in-kotlin-fb0a3ebf151e?source=rss---

    https://cdn-images-1.medium.com/max/1024/1*ONOe1GRzWg_xxGvyYpldVA.jpeg

    In most traditional programming languages code reuse typically comes in the form of inheritance. I’ve been on many projects where the innocent BaseThingy quickly turns into DoesEveryThingy in just a few short months because unfortunately inheritance wasn’t meant for code reuse in ways we often hope for. You see, well designed systems are often constructed from smaller objects that do one thing well and leave everything else to others. The problem is sometimes we have classes that require management of other smaller objects, we can call these classes Controllers as their job is to control other classes. It can be tempting to create a BaseController which will handle things like thread pool management, instantiating different views, injecting models, etc. The downside to this approach (...)

    #design-patterns #java #object-oriented

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 30/11/2018

    Learn Functional Programming without all that Arcane Math Jargon Nonsense SpellCasting PhD Jive Talk
    ▻https://hackernoon.com/learn-functional-programming-without-all-that-arcane-math-jargon-nonsens

    https://cdn-images-1.medium.com/max/500/1*_N3ONSt1LvGuGXs-cMCDCg.jpeg

    Learn Functional Programming without all that Arcane Math Jargon Nonsense Spell-Casting PhD Monad Jive TalkThe Principal stood there, puzzled.“Why do you have your ear to the book?” she asked the young boy.“Because Teacher told me that every letter makes a sound,” he replied.Take your ear off the page and listen to Scott Wlaschin.— Breathe —I know. Transitioning from OO to FP is difficult. I know it’s difficult. We can do this. We’ve done difficult things before.And if you’ve never programmed before?— Phew —You won’t have to be retrained.In fact, given that beginner developers don’t have to displace a long history of ingrained inert ideas, they’re actually becoming the world’s best developers seemingly overnight. See Thiel Foundation, Vitalik, et. al. Just wait till Zoologists get a hold of this. Then (...)

    #kotlin-beginners #clojure #functional-programming #evolutionary-biology #elixir

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 21/10/2018

    Top 5 #kotlin #programming Courses for #java and #android Programmers
    ▻https://hackernoon.com/top-5-kotlin-programming-courses-for-java-and-android-programmers-49e842

    https://cdn-images-1.medium.com/max/1024/1*NQ1f28kf1wcUrSxZgvjtRQ.png

    Kotlin vs Java (▻https://kotlinlang.org)If you don’t know Kotlin, it’s a relatively new programming language that makes programming on Android and Java easy. It’s Android’s official Application development language and 100% compatible with Java and removes some of the pain points of Java.Ever since Google announced Kotlin as the official language for Android Development, I received a lot of queries from my readers about whether Java developers should learn Kotlin now? Or, which one is better to start with Android development, — Kotlin or Java?I have answered that question in my last article, but I am still receiving a lot of queries about learning Kotlin and whether a Java developer should learn Kotlin or not?Well, to be honest with you, being a Polyglot programmer, i.e. a programmer who knows (...)

    #software-development

    • #Android
    • #Java
    • #android
    • #Java
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 1/08/2018

    #git-aware code styling
    ▻https://hackernoon.com/git-aware-code-styling-25675234273d?source=rss----3a8144eabfe3---4

    https://cdn-images-1.medium.com/max/1024/1*hYVVBmPao1nZwlWkqoto6w.png

    There are patterns within your code style you can use to simplify the way you’re interacting with GIT. Or any other Version Control System for that matter…To give you a rough idea of what you should be looking for, think of when need to list a whole bunch of arguments for a function.TLDR:This does not give the full picture, so I suggest you keep on reading…Here why:1. Keeping arguments in one line will make the change less visible:2. Putting every argument in a new line will result in simpler GIT diffs:(more on the last argument in the next point)3. Adding a trailing comma & moving the closing brackets to a new line, will result in simpler git diffs when reordering.This is language-specific. Not all programming languages allow trailing commas. Unfortunately none of the languages I’m using (...)

    #android-app-development #android-development #git-aware #kotlin

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 5/07/2018

    Rise of #kotlin: The Programming Language for the Next Generation
    ▻https://hackernoon.com/rise-of-kotlin-the-programming-language-for-the-next-generation-27beeb52

    Please welcome our weekly sponsor Pusher to Hacker Noon! Pusher makes realtime APIs that enable developers all around the world to quickly add communication and collaboration features to their apps. Their core product enables developers to easily create features like in-app notifications, activity streams, real-time dashboards, live trackers and much more.Today we’re going to catch up with the Pusher Developer Evangelist Zan Markan, to discuss the state of Kotlin, what drives him to do what he does, andDavid: Lets start with the State of Kotlin. You recently ran a Kotlin survey of (more about the nuts and bolts here). You surveyed 2,744 people from January to March 2018 to take the pulse of the ecosystem. What results defied your assumptions? What results confirmed your assumptions? And (...)

    #rise-of-kotlin #state-of-kotlin #weekly-sponsor #programming-languages

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 3/07/2018

    #android Clean Architecture with #kotlin, #rxjava and Dagger 2
    ▻https://hackernoon.com/android-clean-architecture-with-kotlin-rxjava-and-dagger-2-6006be2d0c02?

    Even though we are living in the Agile world with a bunch of available Time and Energy management techniques that are easy to implement in your life, there are still a few things in software development that may increase your productivity and improve the general quality of your code.The thing I want to describe in this article is application architecture in Clean Architecture way. By implementing the Clean in your project you’ll have decoupled, testable parts for data storing, processing and presenting. Clean Application is extremely maintainable, because of interchangeable implementations it would be easy for you to change every aspect of your app: from UI and simple data processing to DB and API frameworks.On the first sight you may consider Clean architecture as a bunch of abstract (...)

    #android-architecture #software-architecture

    • #android
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 3/07/2018

    Build a location feed app for #android with #kotlin
    ▻https://hackernoon.com/build-a-location-feed-app-for-android-with-kotlin-742096e8f80e?source=rs

    Pusher, our weekly sponsor, makes communication and collaboration APIs that power apps all over the world, supported by easy to integrate SDKs for web, mobile, as well as most popular backend stacks. Get started.Often times we like to track and visualize our applications in a central place. Feeds are great for this! In this tutorial, we’ll build an Android app with an activity feed that allows users to broadcast their locations and share with all other connected users in realtime.We’ll build the Android app to monitor the activities of a Node.js REST API. Every time the endpoint of the API is hit, Pusher will publish an event with some information (location shared by the user) to a channel. This event will be received in realtime, on all the connected Android devices.Here’s the app in (...)

    #location-feed-kotlin #location-feed-andoird #weekly-sponsor

    • #android
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 28/06/2018

    Build a location feed app for Android with #kotlin
    ▻https://hackernoon.com/build-a-location-feed-app-for-android-with-kotlin-dc468f43337e?source=rs

    Often times we like to track and visualize our applications in a central place. Feeds are great for this! In this tutorial, we’ll build an Android app with an activity feed that allows users to broadcast their locations and share with all other connected users in realtime.We’ll build the Android app to monitor the activities of a Node.js REST API. Every time the endpoint of the API is hit, Pusher will publish an event with some information (location shared by the user) to a channel. This event will be received in realtime, on all the connected Android devices.Here’s the app in action:PrerequisitesThis tutorial uses the following technologiesPusherAndroid StudioNodeTo follow along, you’ll need to sign up with Pusher and gain access to your dashboard to create a Pusher project. You will also (...)

    #location-feed-app #nodejs #android-with-kotlin #build-a-location-feed

    • #Android
    • #android
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 4/06/2018

    A pull to refresh you can call your own
    ▻https://hackernoon.com/a-pull-to-refresh-you-can-call-your-own-6609870a1806?source=rss----3a814

    https://cdn-images-1.medium.com/max/500/1*quVkuI0ndTV7_IJNkS-T1A.gif

    Introduced in 22.1.0, the SwipeToRefreshLayout has become a staple in many modern Android apps. This is my attempt at creating a simple SwipeToRefreshLayout clone utilizing the ValueAnimator and the Android Touch Framework.Lets first summarize the two functions from the Android touch framework used in this tutorial : onInterceptTouchEvent and onTouchEvent.onInterceptTouchEvent allows a viewgroup to “intercept” a touch event and decide whether to pass it on to its child or consume the event for itself. Hence, this function is a part of the ViewGroup and not View.onTouchEvent is present in both the View and ViewGroup class. In the Viewgroup class, this function is only called when the parent decides not to pass on the touch event to its children (i.e it passes true on (...)

    #android-app-development #custom-views #kotlin

    • #android
    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 15/05/2018

    Build a realtime map using #kotlin
    ▻https://hackernoon.com/build-a-realtime-map-using-kotlin-8f99ebd15fc?source=rss----3a8144eabfe3

    https://cdn-images-1.medium.com/max/600/1*V1Z-O_yCf5KrrXTGJBpaAw.gif

    A basic understanding of Kotlin and Node.js is needed to follow this tutorial.Just as the name implies, the aim of this article is to show the realtime movement of a marker on a map. This feature is common in location tracking applications. We see taxi apps and food ordering apps making use of features like this. Google provides an extremely easy map API, which we will take advantage of, while the realtime functionalities will be taken care of by Pusher.What we will buildWe will build an application that will receive coordinates from the server based on the initial coordinates we inject into it. When these coordinates are received, we update the map on our app.RequirementsFor this tutorial, we need the following:Android studio — version 3.0.1 or higher is recommended.Node JS and npm (...)

    #nodejs #kotlin-and-nodejs #build-a-realtime-map #android

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 18/04/2018
    1
    @sandburg
    1

    How will you handle null references if you are designing a new language?
    ▻https://hackernoon.com/how-will-you-handle-null-references-if-you-are-designing-a-new-language-

    https://cdn-images-1.medium.com/max/980/1*2ZIEC_Tstjqg8vfFg2_M1g.png

    Kotlin’s idiomatic approach to Null SafetyComputer scientist Tony Hoare Said:I call it my billion-dollar mistake. It was the invention of the null reference in 1965The nullable objects introduces a fundamental problem with type system. For e.g If you declare a object as String, it doesn’t guarantee that the value is real String or null.We normally skip null checks based on our assumptions in control flow of code. But when we are wrong, the code crashes with Null Pointer Exception. Java 8 introduced Optionals to deal with Nullable objects. But it has some flawsWhy Java Optionals is not a greatway to handle nulls?Wrapping and unwrapping objects into Optional class makes code verbose. Also since it was introduced only in JDK8, you still need to deal with null values returned from older JDK (...)

    #tony-hoare #kotlin #null-references #null-safety #computer-science

    Hacker Noon @hackernoon CC BY-SA
    • @simplicissimus
      Simplicissimus @simplicissimus 19/04/2018

      Do you really need to use nullable objects?
      […]
      Don’t use nullable types unless it is absolutely needed

      #Ha_ha_ha ! Désolé, je ne suis pas codeur (ou très, très peu) mais ce genre d’injonction m’évoque irrésistiblement une injonction voisine qui simplifierait tellement la vie des statisticiens qu’il n’y en aurait pratiquement plus besoin pour faire tourner les algos…

      N’ayez jamais de valeurs manquantes dans vos données !

      #missing_value

      Simplicissimus @simplicissimus
    Écrire un commentaire
  • @hackernoon
    Hacker Noon @hackernoon CC BY-SA 14/03/2018

    Live stream an #onvif Camera on your #android app!
    ▻https://hackernoon.com/live-stream-an-onvif-camera-on-your-android-app-c26ae9790a53?source=rss-

    https://cdn-images-1.medium.com/max/1024/1*NBY6NTN80rpz093TYU9Nqg.png

    Onvif (stands for: Open Network Video Interface Forum) is a non-profit with the goal of facilitating the development and use of a global open standard for the interface of physical IP-based security products — WikipediaBeing able to control your house, open doors, view in real time your living room, control the lights is a childhood dream! I was really delighted to develop an app and a dependency to ease the development of ONVIF Android apps.ONVIF goal is to standardise how IP products (video surveillance cameras, alarms, doors, audio recorders…) communicate with each others. They created some specifications manufacturers have to conform to to be compliant with ONVIF. The goal behind these specifications is to standardise how to connect to these products, for instance if you develop an app (...)

    #streaming #kotlin #vlc

    Hacker Noon @hackernoon CC BY-SA
    Écrire un commentaire

Thèmes liés

  • operatingsystem: android
  • #android
  • technology: java
  • technology: android
  • #java
  • technology: android
  • programminglanguage: java
  • #android-app-development
  • company: google
  • #software-development
  • technology: api
  • #kotlin
  • product: kotlin
  • #weekly-sponsor
  • #nodejs