Showing posts with label Display. Show all posts
Showing posts with label Display. Show all posts

November 24, 2011

Android Video Screen Capture on PC and Mac tool

Hi Andoird Developers/Users,

Today I have come across, Android Video Screen Display on PC and Mac.

Please follow these steps to see your mobile screen on PC/Mac

Pre-requesites:
a) We should have android-sdk installed on our PC/Mac. If it is not installed, then please download from this link
b) We should have JRE installed on our PC/Mac. If it is not installed, then please download from this link
c) Please know your android-sdk installation directory.
d) Make sure that, we have installed our device USB driver.
e) Please use the USB debugging mode while connecting to the PC/Mac.

Installation:
Run the following commands in terminal
i) cd /platform-tools/
ii) adb devices

Note: is a directory, where you have installed the android sdk software.


By now our device will be recognized and ready to use (Don't disconnect the device).

iii) Download and Run the tool to display Android Device Screen
http://androidscreencast.googlecode.com/svn/trunk/AndroidScreencast/dist/androidscreencast.jnlp

iv) If JRE is installed properly, we can run the tool just by double-clicking on it.
(or)
Through command prompt, we can run the following command.
iv) cd
v) javaws androidscreencast.jnlp

Now we can see the mobile screen on the PC. We can record the screen by selecting the record menu.

References:
1. androidscreencast - Project Hosting on Google Code
2. http://azerdark.wordpress.com/2011/06/06/displaying-android-device-screen-on-pc/

For any queries, mail to psrdotcom@gmail.com

February 24, 2011

Know Your Indian Train Reservation Berth Details Like Berth Position etc.

Hi everyone,

I booked my train ticket even it is in WaitingList. Because, I guessed that, It will get confirmed when chart prepares. After the chart preparation, my train ticket was confirmed with the berth number. They didn't put the information like, which berth it is? Is it Lower, Middle, Upper, SideLower or SideUpper.
I was curious to know the berth position. In the return journey, I thought like "why can't we know the berth position after having the berth number". And I just tried this logic in javascript because, you can give your train berth number and get the berth position in my blog itself.



Please enter your train berth number of Sleeper Class Or III Tier AC and click on the Disply Berth Position button.



I have created an Android application for this utility and its freely available in the market.
Android App supports from Android OS 2.1 Eclair and above.

You can download it from this link Train Berth Position Android App

Android app on Google Play
Train Berth Position Android App
If you have a android smartphone with QR reader then scan the below QR code to redirect you to Google Play and download the app with in no time.
Scan this QR to open app in Google Play
Please send your comments and feedback to psrdotcom@gmail.com

December 19, 2010

Insert and Display image BLOB in JSP page

Hi everyone,

Today we just tried to insert jpeg file and displaying that file in one html page

Source Code:
file name: img_uploadanddisplay.jsp
<%@ page import="java.sql.*"%>
<%@ page import="java.io.*, java.util.*, java.lang.*"%>

<% ResultSet rs=null;
Connection con=null;
Statement stmt=null;
PreparedStatement psmt,psmt1;
Blob blobfile = null;
byte [] imgdata = null;
int status = 0;
boolean del_status = false;
OutputStream os = null;
try
{
String req_id=request.getParameter("id");
System.out.println("Entered"+req_id); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("Jdbc:Odbc:BTSJAVA","System","vijay"); stmt=con.createStatement();
psmt = con.prepareStatement("insert into img_temp values(?,?)");
int id_val = 1;
File img=new File("D:/photos/passport/PP.jpg");
FileInputStream fis= new FileInputStream(img);
psmt.setInt(2,id_val);
psmt.setBinaryStream(1,(InputStream)fis,(int)(img.length()));
status = psmt.executeUpdate();
//System.out.println("Trying to insert data");
if(status>0)
System.out.println("Success");
else
System.out.println("Unsuccess");

stmt.close();

stmt = con.createStatement();
rs = stmt.executeQuery("select imgfn from img_temp where id = 1"); //+Integer.parseInt(req_id));

response.setContentType("image/jpeg");
os = response.getOutputStream();

while(rs.next())
{
System.out.println("Getting Data");

os.write(rs.getBytes("imgfn"));

System.out.println("Got Data");
}

os.flush();
os.close();
}
catch(Exception e)
{
out.println(e);
e.printStackTrace();
}
%>

Create a html file with the following content

image tag src="img_uploadanddisplay.jsp?id=1"


Please send your feedback and queries to me.

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com