Sending Message from PC through mobile using AT Commands over Bluetooth

AT Commands:              AT or attention are set of commands those are used to communicate with GSM modems.I am not going much about it as you can google it.I tried using the AT commands through Bluetooth  which was successful and finally integrated it to JAVA so that I can send message through my mobile using an interface instead of hyper-terminal.Before getting it started check your mobile if it supports the commands or not by using Hyper-terminal or any serial port Software.                In the below codes i have used RxTx serial…

Read More

Getting Facebook Access Token for JAVA applications

    When for the first time i used facebook API in my java application using the  library restFb i faced real trouble with the access token .For that i browsed a lot to get the token at last i was able.So to make it easy here are the steps to get the access token that is valid for 2 months. Step:1   First of all create a facebook application and goto the application page.goto tools and click on APIExplorer   in the menu as shown below select your application…  click on get…

Read More

Storing configuration data for JAVA applications

programming

    Many times it is required to store some configuration settings for your application so that it can use again and again from where it left. Or the application can start with some specific parameters. The properties file can come in handy in such requirements. First, let’s write something to the properties file.   Code: import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Properties; public class App {   public static void main(String[] args) {     Properties prop = new Properties();     OutputStream output = null;     try {        …

Read More

Controlling VLC media player using JAVA

programming

Basically, I was looking for a method to communicate with the VLC media player so that I can get the currently playing video on the player and my app can search the internet and get the details about the movie. For that, I googled a lot and finally came to know that VLC has a web interface and I used that with my JAVA app to control and getting details of the movie.     Setting Up First, open the VLC and go to tools->preferences and check the All radio…

Read More

Sending Email using JAVA mail API and gmail account

                Sending a mail using JAVA mail API in JAVA is really a easy part.Here i am posting the codes to simply send a mail using the API.First you have to download the JAVA mail library and add it to your build path. Code: package com.oksbwn.mail;import java.awt.Color;import java.awt.event.MouseAdapter;import java.awt.event.MouseEvent;import java.io.FileInputStream;import java.io.InputStream;import java.util.Properties;import javax.mail.*;import javax.mail.internet.*;import javax.swing.BorderFactory;import javax.swing.JButton;import javax.swing.JComponent;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JTextField;import javax.swing.JTextPane;import com.oksbwn.ErrorHandling.handleExceptions;import com.oksbwn.popUp.popMe;//import com.oksbwn.popUp.popMe;public class SendMail  extends JFrame {    final static JFrame frame = new JFrame();    private static final long serialVersionUID = 1L;    public void SendMailTo(){       //public static…

Read More