Tag Archives: String
Class has not initialiser error in Swift – Solved.
Apart from other languages, when you write a class in Swift, It should have a initialiser. To solve this we have to write init() function in that particular class. Just like below. For example, look at the below class. Here we have 5 variables. The above error usually comes when you don’t initialize all variables in the class… Read More »
Uploading Image to Server – Android Eclipse Version.
Hi all, In today’s tutorial I will show you how to send an image to server using POST method in ANDROID. If you are working in Android studio, then checkout the article here. Uploading an image to server is a basic requirement in many of our application. Sending data to server which is using a PHP Script is… Read More »
How to copy a file to another saved in SDCARD in Android?
Hello all… This tutorial explains how to copy a file contents to another in Android. The file to copy is saved in SDCARD, however you can change the path to save it in your application sandbox. if you want to save it in your sandbox, change the path to /data/data/your_packagename/your_file.extension Now we will see the layout for the… Read More »
How to load a spinner with values from SQlite Database in android?
Here is a simple example showing how to load a database values in a spinner in android. OK we will start. This is the layout for the spinner row. spinner_row.xml This is the layout for the interface. activity_main.xml Now this is the MainActivity.java file that uses the spinner and the database. Join the Forum discussion on this post… Read More »
How to get all email addresses associated with an android device?
How to read and write files to SDCARD and application SandBox in Android – A complete example?
Here is a complete example of How to read and write files to SDCARD and application SandBox in Android. First create a new project and inside the mainActivity paste this code. Now create another class named MyFile.java and copy this code into it. Now the layout for the xml file. Note you should give this permission in the… Read More »
Creating a JButton component in swing
Java swing provides a native look and feel that emulates the look and feel of several platforms. Here i am going to create a Button and adding it to Frame. For this first create a Jframe object,a JPanel object and a Container object JFrame f = new JFrame(); JPanel panel1 = new JPanel(); Container con = f.getContentPane(); Then… Read More »
JSON IN ANDROID.
How to read and write a text file that is stored in your application sandbox in ANDROID?
Hi all….. In this post I will show you how to read a text file in ANDOID. Let your file is in the your application sandbox of your ANDOID project, i.e the file’s location is /data/data/your_package_name folder. To view this folder -> open File Explorer and expand each folder. For this example to work first push te file… Read More »
Date and TimePicker in ANDROID.
Conversion from String to Double using C#
Get characters in a string – C Sharp/C#
Hi, Sometimes you may need to get all the characters in a string using C Sharp/C#. The following code gives you an example of how to get or display all the characters of a given string. Output: sampleString[0] = I sampleString[1] = sampleString[2] = L sampleString[3] = o sampleString[4] = v sampleString[5] = e sampleString[6] = sampleString[7] =… Read More »
Java check memory Allocation
How to concat a string to another in Windows Phone – C#?
How to Upload Multiple files in one request along with other string parameters in android?
Hello everyone, I have shown two methods to upload files in android. In today’s tutorial I will show another simple method to upload files. With this method you can upload multiple files in one request + you can send your own string parameters with them. Here is another method on working with uploading of images. How to upload… Read More »
How to find if a string starts with a particular word – JAVA ?
Complex JSON String parsing in ANDROID
Hello all….. In the previous post I have shown you how to parse a Simple JSON String in ANDROID. In today’s tutorial I will show you how to parse a complex JSON String. Take a look at the example Here the JSON String used is Now let’s dothe operation……….. Please check the Logcat for the output. Please leave… Read More »
Parsing JSON Object in ANDROID.
JSON are alternative to XML and easy to understand than XML. As other languages Java also supports JSON parsing. Here is a simple example of JSON parsing in ANDROID. This is the JSON String that I am going to parse. And this JSON is same as this xml. Here is the code for this parsing. Please check the… Read More »
How to send email from and ANDROID Application programatically?
Hello all…….. In today’s post I will show you send mail from an android application progrmatically.. Let’s go to the code fast…… This is the code in the mail java file…. Now the layout file (main.xml) The AndroidManifest.xml Note: However if you test this in your emulator, it will not work. Install it in your device to test… Read More »
Compare two strings in C Sharp/C# – Case Insensitive
How to create and delete a directory in SdCard in ANDROID?
Hi all…… This is a simple example to create and delete a directory in ANDROID. Here the directly is created in the SDCARD. So first create an SDCARD and start the emulator with the SDCARD. Let’s look at the program. Use can use this program to create or delete a file in ANDROID also. main.xml Now go to… Read More »
ANDROID – Upload an image to Server in Android Studio
Hi all, In today’s tutorial I will show you how to send an image to server using POST method in ANDROID. Uploading an image to server is a basic requirement in many of our application. Sending data to server which is using a PHP Script is already explained in this example . Now in this example I will… Read More »
Android dialog with ListView
For implementing a ListView, we first create a xml which contains a ListView named list.xml Next we create a Dialog Object and inflate the above xml and when the listItem is clicked then a Alert Dialog windows comes The java file is listed below The alert window look like this When the Item is selected then
How to insert a string using C# ?
- 1
- 2