|
|
Hi everybody.
I need some help about a j2me project that will do send a character from a phone to another bluetooth device. I've tried to understand java but i am mechatronic engineer student so couldn't handle with it.
if you have a project ready, can you share it or if anyone know java well, can write a code.
by the way i am trying to control a toy car with my phone. i am gonna use accelerator sensors too but it is laters work. for now i need to communicate only one character. for example when i press button "2" it will send "a" character etc..
If you could help me I would really appreciate it.
Thanks.
|
|
|
|
|
Member 8164935 wrote: if you have a project ready, can you share it or if anyone know java well, can write a code. That's not how Code Project works. Point 2 of the Forum Guidelines above says
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with. I can only suggest that you look at the phone manufacturers' developer sites - I use both Motodev and the Nokia Developer Forum. They have sample code for various bluetooth applications.
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
having problem to translate from WinForm to Windows-CE C# program - FTP transfer
i have this code for transfer from Local computer to FTP server
its work excellent on WinForm, i must have this on Windows-CE and it dosnt work
the code:
string MyFile = @"d:\PC.sdf";
string url = "ftp://127.0.0.1/PC.sdf";
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(url);
request.Method = WebRequestMethods.Ftp.UploadFile;
//request.Credentials = new NetworkCredential("user name", "password");
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = false;
//byte[] buffer = File.ReadAllBytes(MyFile);
using (Stream reqStream = request.GetRequestStream())
{
int count = 0;
byte[] buffer = new byte[100];
using (FileStream file = new FileStream(MyFile, FileMode.Open))
{
while ((count = file.Read(buffer, 0, 100)) > 0)
{
reqStream.Write(buffer, 0, count);
}
}
}
thanks in advance
|
|
|
|
|
What error messages are you getting?
On WinCE devices you might not have "d:" so check that.
Its the man, not the machine - Chuck Yeager
If at first you don't succeed... get a better publicist
|
|
|
|
|
Hi! We have a Windows Mobile 6.5 based project which uses a Bluetooth serial port any windows phone (We use HTC HD2) to communicate with several industrial transmitters. Now we have been asked to port this WM 6.5 application to WP7, iPhone and Android phones/tablets. I searched this forums and many others but it seems to me neither Microsoft(WP7) nor Apple (iPhone) do not support the Serial Port Profile. (Why???) I am not quite sure about Android. Does anybody of you have any experience about porting System.IO.Ports.SerialPort control to IPhone, WP7 or Android? Thanks guys!
|
|
|
|
|
iOs - no chance. (Snowball in hell and all that.)
Android looks possible. See this page[^] for example.
WP7 - I have no idea, but I am sure Google knows someone who has some idea.
I do know that my (fairly ancient) J2ME BT SPP code works on a number of devices.
Lots of luck!
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Thanks Peter! Why I am not surprised? I wonder whether we can use the USB port of iPhone and WP7 phones to send data through USB port like PCUSB to Serial adapters?
Yeah, I found that android "help" also and the Bluetooth chat sample. That might be a good starting point.
Does anybody understand why Microsoft and Apple does not support Bluetooth SPP? Security?
|
|
|
|
|
Loui88 wrote: Does anybody understand why Microsoft and Apple does not support Bluetooth SPP? Certainly not me!
Loui88 wrote: Security? I can't see how security is compromised by apps having access to BT SPP.
Maybe you could consider a USB BT dongle, although I have no idea how you'd drive it.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Of course a USB to Serial dongle might be acceptable but I do not think any dongle vendor would have driver for iPhone nor for WP7 phones...
Some plants allow you to take you mobile phone or PDA to a intrinsically safe locations. So this is why we use Bluetooth connection. A wired USB or USB to Serial adapter might cause sparks, which are deadly weapons there...
So it looks like Microsoft and Apple sent a message to us regarding the serial ports: Welcome back to 1981!
|
|
|
|
|
If you can't do it with Android (and you probably can), then I guess it's one step back to J2ME. Nokia and Motorola both make J2ME-capable touch screen and regular-keyboard devices that I have used. There are suitable products from other manufacturers as well. Depends what's still on sale in your part of the world.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Everybody wants fancy iPhone, WP7 and Android phones, so the step back solution won't work for us. Do you know how can I ask Microsoft or Apple about BT SPP support officially? I mean do they have a wish list for the next releases? I think the BT SPP support is only a software question. I do not know what kind of BT chips (Broadcom or Widcomm) they use in iPone and WP7 but the ones I tested all had the serial port support.
|
|
|
|
|
Loui88 wrote: Do you know how can I ask Microsoft or Apple about BT SPP support officially? No idea.
Loui88 wrote: I do not know what kind of BT chips (Broadcom or Widcomm) they use in iPone and WP7 but the ones I tested all had the serial port support. SPP support is not a function of the BT chip(s) - it's in (or isn't in ) the driver stack.
Loui88 wrote: I think the BT SPP support is only a software question. Yes.
[rant, only half-joking]
The only way I can think of to get M$ and Apple's attention is to do it on Android and sell a million copies. Then they will want to climb on your bandwagon and tell the world it was all their idea anyway.
[/rant]
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Hi everyone,
I liked to develop a small application for Android phone. Below is the steps how my application works.
1. create an icon which should be in the home page of the phone.
2. After touching this icon, it will open an browser by opening a log in screen of a web application.I want to embed the url of the website in this icon only.(other options are also advisable). so that it directly send the request to the server. That is i want to bypass the steps required to get the login screen by opening a browser, type the url and hit enter.
3. Now I want to use HTML5 and Jquery in an existing application which is build on ASP.NET
In the existing application I used Windows services for the Database access. So my question here is ;
i) Is it possible to do it by minimal changing of exiting ASP.NET code (i don't want to replace the exiting business logic which is written in C#) and implement HTML5 with Jquery.
ii)If not what are the other way to do this? The existing application is not a mobile application.
Thanks in advance!!!!!!!!!!
Dilip
|
|
|
|
|
Take a look at these articles[^] here on CodeProject.
|
|
|
|
|
looking for solution, if i dont press any key or touch the screen for 2 minutes on windows-mobile
i need to return to LogIn screen (from any screen of my program).
thanks in advance
modified on Saturday, August 6, 2011 4:42 AM
|
|
|
|
|
Set a timer in a static class with a tick of say 10 seconds and a counter. If the counter > 120 then call the logout method.
Every time you navigate to a page reset the timer to zero.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi Fellows
I am wondering how can I create a mobile website in VS2010 asp.net C#. I have been looking through the VS2010 and haven't found a way to create a Mobile Website project. I haven't found a good resource that could explain me the components I need to download.
If you could help me I would really appreciate it.
Thanks
|
|
|
|
|
|
hi,
i want to send mms by gsm mobile.
please guide me from where i started for this?
thanks in advance.
|
|
|
|
|
You can use bluetooth.
May be it works.
http://stores.ebay.com/Shears-and-Scissors
|
|
|
|
|
See more: Java
Hi all,i am doing a project with LWUIT 1.4.0(ResourceEditor),netbeans 6.9 i create a form welcome on which i have two radio buttons Verification and Enrollment when user select Verification and press OK button then a form(Login) should display and when it select Enrollment then authentication form display.I create gui with resource editor it generates four project by default in netbeans,1.Demo,2.Demo_Desktop,3.Demo_MIDP,4.Demo_RIM(for blackberry),currently i am running desktop projetc.Resource editor generates two file statemachine and statemachinebase class.I have to write my code in statemachine class.I posted my code
Collapse
/**
* Your application code goes here
*/
package userclasses;
import generated.StateMachineBase;
import com.sun.lwuit.*;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;
import com.sun.lwuit.RadioButton;
import com.sun.lwuit.util.Resources;
import com.sun.lwuit.ButtonGroup;
/**
*
* @author Your name here
*/
public class StateMachine extends StateMachineBase implements ActionListener {
Button OK;
Resources resources;
RadioButton Verifi=new RadioButton("Verification");
RadioButton Enroll=new RadioButton("Enrollment");
Form fo,f;ButtonGroup bg=new ButtonGroup();
StateMachineBase cl=new StateMachineBase()
{};
public StateMachine(String resFile) {
super(resFile);
}
/**
* this method should be used to initialize variables instead of
* the constructor/class scope to avoid race conditions
*/
StateMachine() {
try{
resources = Resources.open("/NEW AADHAR.res");
}
catch(java.io.IOException err)
{ err.printStackTrace(); }
cl.setHomeForm("Welcome");
//fo = (Form)cl.startApp(resources,null,true);
fo=Display.getInstance().getCurrent();
f=cl.findWelcome(fo);
Verifi=cl.findVerification(f);
Enroll=cl.findEnrollment(f);
bg.add(Enroll);
bg.add(Verifi);
OK=cl.findOK(f);
//f.addCommandListener(this);
//Verifi.addActionListener(listener);Enroll.addActionListener(listener);
}
protected void initVars() {
}
/**
* @param c
* @param event
*/
public void actionPerformed(ActionEvent ae) {
throw new UnsupportedOperationException("Not supported yet.");
}
protected boolean onWelcomeEXIT() {
boolean val = super.onWelcomeEXIT();
return val;
}
protected void onWelcome_OKAction(Component c, ActionEvent event) {
}
ActionListener listener=new ActionListener()
{
public void actionPerformed(ActionEvent ae) {
System.out.print("HIIIIIIIIIIII");
super.onWelcome_VerificationAction(c, event);
super.onWelcome_EnrollmentAction(c, event);
// Verifi = (RadioButton) c; // initialize here
Verifi.addActionListener(listener);
Object source =ae.getCommand();
if (Verifi.hasFocus()) {
if(source==OK.getText())
{
showForm("Login",null);}
} else {
Dialog.show("INFORMATION", "Please select option", "OK", "Cancel");
}
throw new UnsupportedOperationException("Not supported yet.");
}
};
}
When i add radiobuttons and buttons then these are automatically generated in statemachinebase class i just used them in statemachine class.
findVerification()
findEnrollment()
onWelcome_OKAction()
onWelcomeEXIT()
Thanks See more: Java
Hi all,i am doing a project with LWUIT 1.4.0(ResourceEditor),netbeans 6.9 i create a form welcome on which i have two radio buttons Verification and Enrollment when user select Verification and press OK button then a form(Login) should display and when it select Enrollment then authentication form display.I create gui with resource editor it generates four project by default in netbeans,1.Demo,2.Demo_Desktop,3.Demo_MIDP,4.Demo_RIM(for blackberry),currently i am running desktop projetc.Resource editor generates two file statemachine and statemachinebase class.I have to write my code in statemachine class.I posted my code
Collapse
/**
* Your application code goes here
*/
package userclasses;
import generated.StateMachineBase;
import com.sun.lwuit.*;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.events.ActionListener;
import com.sun.lwuit.RadioButton;
import com.sun.lwuit.util.Resources;
import com.sun.lwuit.ButtonGroup;
/**
*
* @author Your name here
*/
public class StateMachine extends StateMachineBase implements ActionListener {
Button OK;
Resources resources;
RadioButton Verifi=new RadioButton("Verification");
RadioButton Enroll=new RadioButton("Enrollment");
Form fo,f;ButtonGroup bg=new ButtonGroup();
StateMachineBase cl=new StateMachineBase()
{};
public StateMachine(String resFile) {
super(resFile);
}
/**
* this method should be used to initialize variables instead of
* the constructor/class scope to avoid race conditions
*/
StateMachine() {
try{
resources = Resources.open("/NEW AADHAR.res");
}
catch(java.io.IOException err)
{ err.printStackTrace(); }
cl.setHomeForm("Welcome");
//fo = (Form)cl.startApp(resources,null,true);
fo=Display.getInstance().getCurrent();
f=cl.findWelcome(fo);
Verifi=cl.findVerification(f);
Enroll=cl.findEnrollment(f);
bg.add(Enroll);
bg.add(Verifi);
OK=cl.findOK(f);
//f.addCommandListener(this);
//Verifi.addActionListener(listener);Enroll.addActionListener(listener);
}
protected void initVars() {
}
/**
* @param c
* @param event
*/
public void actionPerformed(ActionEvent ae) {
throw new UnsupportedOperationException("Not supported yet.");
}
protected boolean onWelcomeEXIT() {
boolean val = super.onWelcomeEXIT();
return val;
}
protected void onWelcome_OKAction(Component c, ActionEvent event) {
}
ActionListener listener=new ActionListener()
{
public void actionPerformed(ActionEvent ae) {
System.out.print("HIIIIIIIIIIII");
super.onWelcome_VerificationAction(c, event);
super.onWelcome_EnrollmentAction(c, event);
// Verifi = (RadioButton) c; // initialize here
Verifi.addActionListener(listener);
Object source =ae.getCommand();
if (Verifi.hasFocus()) {
if(source==OK.getText())
{
showForm("Login",null);}
} else {
Dialog.show("INFORMATION", "Please select option", "OK", "Cancel");
}
throw new UnsupportedOperationException("Not supported yet.");
}
};
}
When i add radiobuttons and buttons then these are automatically generated in statemachinebase class i just used them in statemachine class.
findVerification()
findEnrollment()
onWelcome_OKAction()
onWelcomeEXIT()
Thanks
|
|
|
|
|
Please edit your message, it is totally unreadable. Remove the duplicate paste of your question and its code, and put your code blocks between <pre> tags. Also use the Preview button to check it before final posting.
The best things in life are not things.
|
|
|
|
|
Hi
i want to read chm and epub file in my application , how can i do this ?
|
|
|
|
|
First Web service program in Window phone 7 using Visual studio 2010.
how it develop? I want all steps and with exp.
|
|
|
|