Currently browsing tag

Android

WhatIsAndroid

What is Android? A beginner’s guide

Android is an open source and Linux-based Operating System for mobile devices such as smartphones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies. Android offers a unified approach to application development for mobile devices which means developers need only develop for …

web-service

File Transfer using C# .Net Socket Programming 3/3

Continued code… Server Code: [C#] using System; using System.Collections.Generic; using System.Text; using System.Net; using System.Net.Sockets; using System.IO; namespace beginSocketServer { //FILE TRANSFER USING C#.NET SOCKET PROGRAMMING – SERVER class Program { static void Main(string[] args) { try { Console.WriteLine(“That program can transfer small file. I’ve test up to 850kb file”); …

Android Why Google map is not displayed in my application

Android – Why Google map is not displayed in my application?? There are some reasons due to which a Google map is not displayed in Android Application instead a grey portion with squares is displayed. Some possible reasons are as follows. Do not using API key : In order a …

Android How to obtain Google API key for Windows

Android – How to obtain Google API key for Windows ? There are some steps to obtain a Google API key for windows. The steps are described in detail below. While you are developing and debugging your application, you will likely be sigining your application in debug mode — that …

LabVIEW Arduino Android

LabVIEW, Arduino & Android During lunch today I picked up the words LabVIEW and Arduino. Now that got me interested (or excited, as they would say here) and it turned out that a technical session about hacking Arduino with LabVIEW would take place later in the afternoon. So I attended …

Add a smartphone to your application

Add a smartphone to your application One of the biggest hypes of the moment is of course (or should I say still?) the Apple iPhone. I do not have one, so I do not have an opinion about it, but it seems that many users are crazy about it. This …

Send File from Server to Client using C# Socket Programming 5/6

Full codes are here…   Client code: using System; using System.Collections.Generic; using System.Text; using System.Net; using System.Net.Sockets; using System.IO; namespace Client_Socket { //FILE TRANSFER USING C#.NET SOCKET – CLIENT class Program { static void Main(string[] args) { try { Console.WriteLine(“That program can transfer small file. I’ve test up to 850kb …

Send File from Server to Client using C# Socket Programming 4/6

6) Client Action: This section of code is retrieving file name length and by using this file name which was sent by server at the starting of file data. This will require retrieving file name. int fileNameLen = BitConverter.ToInt32(clientData, 0); string fileName = Encoding.ASCII.GetString(clientData, 4, fileNameLen); 7) Client Action: Now received data is saving at …

Send File from Server to Client using C# Socket Programming 3/6

4) Server Action: These codes are not directly related with socket programming. This is using to read and send file to client. string fileName = “test.txt”;// “Your File Name”; string filePath = @”C:\FT\”;//Your File Path; byte[] fileNameByte = Encoding.ASCII.GetBytes(fileName); byte[] fileData = File.ReadAllBytes(filePath + fileName); byte[] clientData = new byte[4 + fileNameByte.Length + fileData.Length]; byte[] fileNameLen = BitConverter.GetBytes(fileNameByte.Length); fileNameLen.CopyTo(clientData, …

Send File from Server to Client using C# Socket Programming 2/6

2) Client Action: Now turn is coming to client to request server. IPAddress[] ipAddress = Dns.GetHostAddresses(“localhost”); IPEndPoint ipEnd = new IPEndPoint(ipAddress[0], 5656); Socket clientSock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP); clientSock.Connect(ipEnd); These codes are from client application, here first two lines are using to get Localhost IP address and by using …