Web services allow different applications from different sources to communicate with each other without time-consuming custom coding. All communication is in XML, and they are not tied to any operating system or programming language.
This post will explain how to consume a third party web service
[ read more ]
Just Call that Method and send Email in Android
public void emailSending( String strFile)
{
try {
strFile = "/sdcard/Semiotics/Config/ftpCongif.txt";
File file = new File(strFile);
if (!file.exists())
file.mkdirs();
strFile = strFile ;//+ "/report.html";
//create
[ read more ]
In today’s tutorial I will show you how to open the wifisettings in android programatically.
This code comes handy when the user have not enabled the wifi and you want the user to enable it for your application to work.
Here is the code for that.
1
2
3
4
5
6
7
8
9
10
1
[ read more ]
Last exercise of "File Explorer" list file/directory without order. We can implement Comparator<? super File> to sort the directory/file in alphabetical order. We can also convert the file name to lower case before comparing, such that the array will be sorted in alphabetical order ignore case
[ read more ]
- First of all, as a user app, I think it should not access the root "/" directly. So I assign root to Environment.getExternalStorageDirectory(), it's the Android external storage directory.
- Secondly, if a file/directory is hidden or un-readable, it will not be display.
Create /res/layout/row.
[ read more ]
In the last exercises "A simple ListView, extends ListActivity", "ListView, with icon" and "Implement onListItemClick() of ListActivity", all use the build-in ArrayAdapter with standard layout in each row. All row have the same icon.
In this article, a custom ArrayAdapter will be created. The met
[ read more ]
Modify the java code of the last exercise "ListView, with icon" to add listener of onListItemClick()
AndroidList.java
package com.exercise.AndroidList;
import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import andro
[ read more ]
ListView in simplest form with plain text only. This exercise describe how to add a icon in ListView.
create a new file in /res/layout/row.xml, to setup our layout on each row.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/an
[ read more ]
It's the simplest form of ListView, extends ListActivity. The list is displayed as a single line of plain text, using the simple Android built-in layout "android.R.layout.simple_list_item_1".
package com.exercise.AndroidList;
import android.app.ListActivity;
import android.os.Bundle;
impor
[ read more ]
convertView - The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before using. If it is not possible to convert this view to display the correct data, this method can create a new view.
If the convertView is null, we have to run the co
[ read more ]