Skip to main content

Posts

Showing posts from February, 2019

Android Swipe Down to Refresh a ListView

Finally, Google released an official version of pull-to-refresh library! It is called  SwipeRefreshLayout , inside the support library, and the documentation is  here : 1)  Add  SwipeRefreshLayout  as a parent of view which will be treated as pull to refresh layout. (I took  ListView  as an example, it can be any  View  like  LinearLayout ,  ScrollView  etc.) <android.support.v4.widget.SwipeRefreshLayout android:id = "@+id/pullToRefresh" android:layout_width = "match_parent" android:layout_height = "wrap_content" > <ListView android:id = "@+id/listView" android:layout_width = "match_parent" android:layout_height = "match_parent" /> </android.support.v4.widget.SwipeRefreshLayout> 2)  Add a listener to your class protected void onCreate ( Bundle savedInstanceState ) { SwipeRefreshLayout pullToRefresh = findViewById ( R . id . pullToRefr...

WSO2 DAS - Hello World!

https://www.javahelps.com/2015/11/wso2-cep-hello-world.html WSO2 Data Analytics Server is a smart analytics platform for both real-time and batch analytics. The real-time analytics is provided through their powerful open source Complex Event Processing Engine engine Siddhi. This article focuses on the complex event processing capability of the DAS server and provides a quick start guide on how to setup an event stream and process events generated by an HTTP source. Prerequisite: Oracle JDK 1.7 or latest Memory – Minimum 2GB Disk – Minimum 1 GB For more details:  Installation Prerequisites Step 1: Download and extract the latest version of WSO2 DAS from the official link:  WSO2 Smart Analytics Step 2: Install  Postman  in Google chrome. We will use Postman to send HTTP requests to the CEP. You can use any other HTTP clients for this purpose. Step 3: Open your terminal in  wso2das-x.x.x  folder and execute the following command...

Access MySQL from Android through RESTful Web Service

https://www.javahelps.com/2018/12/access-mysql-from-android-through.html Finally, I found some time to write about accessing MySQL or any database that you can think about from an Android application. Android offers a built-in database known as SQLite which is supposed to be used for local data storage. For example, if you want to store your recent transactions locally in the device, you have to go with SQLite. I have already written a few articles on how to use SQLite database in Android. However, enterprise mobile applications often depend on client/server databases such as MySQL, Oracle DB or MongoDB. Whatever the database, you have chosen, the way to access them from an Android application is pretty same. In this article, I explain how to access a MySQL database from an Android application written in Kotlin. I will use Kotlin for all upcoming Android tutorials because it is the future of Android programming. Kotlin is a JVM based language and you can easily convert a Kot...