Build the future of communications.
Start Building for Free

Java posts

  • By Felistas Ngumi
    How to Send a WhatsApp Message in 30 Seconds Using Java and Gradle header - How to Send a WhatsApp Message in 30 Seconds Using Java and Gradle

    Approximately Two billion people across the globe use WhatsApp as a communication medium. It is fast and a convenient app to use as it does not only provide peer to peer messaging, but it is also used by companies and entrepreneurs to run their businesses through WhatAapp business. Over the years, WhatsApp has proven to be an important tool to engage with customers as at least more than 58% of its users use it more than once in a day.

    The Twilio WhatsApp Business API is handy and secure and enables you to accomplish a number of tasks including sending and receiving media files, sharing map locations and driving engagement with your users. It is a great enabler for businesses worldwide. So, why not scale your business and leverage tools that have proven to work over time?

    In this tutorial, I will take you through how to send a …

    Read More
  • By David Mbochi
    How to Write Custom Queries Using JdbcTemplate In Spring Boot header - How to Write Custom Queries Using JdbcTemplate In Spring Boot

    When developing applications it is crucial for a developer to understand the abstractions behind the libraries that are used in the application. This will help the developer understand the code better and assist them in writing efficient applications.

    In this tutorial, you will learn how to write custom queries using JdbcTemplate which is a wrapper class for writing row JDBC queries. There are other implementations that are much more convenient than JdbcTemplate such as Hibernate and the Java Persistence API (JPA) because these API’s hide the actual implementations from the developer and only expose the necessary details such as the methods to insert, update and delete records from your database.

    When you decide to use JdbcTemplate as opposed to Hibernate and the Java Persistence API you are prone to have boilerplate code in your application. The benefit of using JdbcTemplate is that it provides low level access to your queries …

    Read More
  • By Pooja Srinath
    Spring BootアプリケーションでSMSを送信する方法 Spring BootアプリケーションでSMSを送信する方法

    この記事はPooja Srinathこちらで公開した記事(英語)を日本語化したものです。

    本稿では、Spring BootでWebSocket APIを使用し、シンプルなSMS送信アプリケーションを構築する方法について説明します。






    TwilioコンソールのBuy a Numberにアクセスします。






    Spring In …

    Read More
  • By Matthew Gilliard
    Envoyer un SMS sans numéro de téléphone avec un AlphaSenderID et Java Envoyer un SMS sans numéro de téléphone à l'aide d'un expéditeur alphanumérique et de Java

    Les SMS sont utiles pour la communication bidirectionnelle : vous pouvez discuter avec vos amis et interagir avec des entreprises. Il existe également de nombreux cas d'usage où les messages unidirectionnels sont pratiques - par exemple, les alertes, les notifications et les vérifications. Pour ce type de message, vous devriez envisager d'utiliser un expéditeur alphanumérique.

    Voici quelques informations que vous devez connaître concernant l'utilisation d'un expéditeur alphanumérique (AlphaSenderID) :

    • Un message identifie l'expéditeur par son nom sans que le numéro de téléphone soit enregistré dans le répertoire du destinataire.
    • Un expéditeur alphanumérique unique peut être utilisé dans de nombreux pays sans qu'il soit nécessaire de disposer d'un numéro de téléphone dédié pour chacun d'entre eux.
    • Il n'est pas possible de répondre à un message provenant d'un expéditeur alphanumérique. L'avantage, c'est que vous n'êtes pas tenu de gérer les messages entrants. En revanche, ce type d'expéditeur n'est pas adapté aux …
    Read More
  • By Ryan Kay
    How to Write Effective Unit Tests in Java header - How to Write Effective Unit Tests in Java

    In the early years of my career, getting started with testing my code felt like trying to break through a brick wall. To hopefully make your experience less painful, here is an attempt at the introduction I was given to this important topic.

    In this article, you will learn how to write code which is easily testable and how to test it using a single tool: JUnit 5.


    • Java Development Kit (JDK) version 8 or newer.
    • JUnit 5.8.2 (though most versions of JUnit 5 should work).
    • An IDE with JUnit integration is recommended, such as Eclipse, Intellij IDEA, Android Studio, NetBeans. This article will make references to IntelliJ IDEA.
    • A build tool is recommended, such as Gradle or Maven to manage the JUnit 5 dependency.

    Why You Should Care About Testing

    Anytime you write application code that is deployed and used, it is being tested. Whether you …

    Read More
  • By Nida Khan
    JavaとSpring BootでREST APIを作成する方法 JavaとSpring BootでREST APIを作成する方法

    この記事はNida Khanこちらで公開した記事(英語)を日本語化したものです。

    もうずいぶん前からTwilioのREST APIを使用していますが、HTTPでクライアントとサーバー間の通信を確立する際にREST APIがどのように使用されているかを見るといつも驚きます。APIを呼び出すと、サーバーが呼び出されます。次に、サーバーがビジネスロジック全体を実行し、結果を返します。

    自分でAPIを作成できるように、これらのAPIがどのように開発されているかを常に知りたいと思っていました。これが分かれば、Spring Bootなどのさまざまなフレームワークを探求できます。そこで、Spring Bootを使用してREST APIを開発し、初心者がSpring Bootを使い始めるのに役立つこのチュートリアルを作成することにしました。

    このチュートリアルでは、Spring BootでREST APIを開発し、従業員データベースでCRUD操作を実行する方法をご紹介します。


    • Javaに関する予備知識または学習意欲。
    • Java Development Kit(JDK)バージョン8以降。
    • Maven 3.3以降
    • MySQL。MySQLで従業員データを保存し、REST APIでアプリケーションにアクセスします。MySQLの設定をWorkbenchで行う手順については、ガイドに従ってください。
    • コード開発用のEclipse IDE。インストーラを実行すると、インストールする具体的なパッケージが求められるため、[Eclipse IDE for JavaEEDeve …
    Read More
  • By Diane Phan
    How to Make a Mysterious Phone Call with Twilio Voice and Java How to make a mysterious phone call with Twilio Voice and Java

    I'm sure all of us have made prank calls at some point in our lives or wanted to use phones to create a tricky puzzle.

    With the help of Twilio and Java, you can surprise a friend with a mysterious phone call that plays your chosen sound file, without having to pick up your mobile device.

    In this article, you'll write a couple of lines of Java code to make an outbound call that plays a chosen sound file to any phone number, right from the command line.

    Tutorial requirements

    • A free or paid Twilio account. If you are new to Twilio get your free account now! (If you sign up through this link, Twilio will give you $10 credit when you upgrade.)
    • Some prior knowledge of Java or a willingness to learn.
    • A smartphone with active service, to test the project


    Start off by creating a …

    Read More
  • By Diane Phan
    Cómo enviar un SMS con un clic de botón en Java Cómo enviar un SMS con un clic de botón en Java

    Twilio va de potenciar las comunicaciones y de hacerlo de forma cómoda y rápida en cualquier lenguaje.

    Con la ayuda de Twilio y Java, puede enviar un mensaje rápido a alguien sin tener que usar el dispositivo móvil. El uso de Java también le ofrece la divertida oportunidad de crear interfaces gráficas de usuario (GUI) para complementar la experiencia del usuario en el envío de un SMS de una forma más divertida e interactiva.

    En este artículo, implementará una pequeña GUI con botón que enviará un SMS al dispositivo móvil una vez que se haga clic.

    Requisitos del tutorial

    Read More
  • By Diane Phan
    How to Generate Story Ideas with Twilio SMS, Java, and OpenAI GPT-3 header - How to Generate Story Ideas with Twilio SMS, Java, and OpenAI GPT-3

    There are many possibilities when it comes to using OpenAI GPT-3's engine. You can build a chatbot, generate new story ideas, or translate sentences from one language to another.

    With the help of the Twilio SMS API, Java, and the Spark framework, you can respond to all incoming SMS' with a text message generated by the OpenAI GPT-3 engine. This article will help you set up a Spark application with access to OpenAI's services.

    Specifically, you will learn how to send generated story ideas from the OpenAI GPT-3 API directly to a mobile device via SMS using Java and Spark.

    Tutorial Requirements

    Read More
  • By Luís Leão
    Como receber e responder SMS com Java e Twilio Como receber e responder SMS com Java e Twilio

    Se você está se perguntando como enviar SMS a partir do código Java, nós já temos o que você precisa. No entanto, as pessoas esperam cada vez mais poder conversar com empresas e serviços, em vez de apenas obter um fluxo interminável de notificações. Para criar apps realmente envolventes e interativos, você também poderá responder às mensagens recebidas.

    Para isso, você precisará configurar um URL no console da Twilio. As mensagens recebidas vão acionar as solicitações HTTP para esse URL, e a resposta a essas solicitações webhook vai determinar o que acontecerá em seguida, incluindo o envio de respostas. As respostas devem ser escritas em um código XML chamado Twilio Markup Language ou TwiML.

    Nesta postagem, vou orientar você a configurar um servidor da Web usando o Spring Boot para fazer exatamente isso.

    Como configurar

    Antes de começarmos, você precisará de:

    • Uma instalação do Java 8 ou mais …
    Read More
  • Newer
    Sign up and start building
    Not ready yet? Talk to an expert.