I'd like to make MIDlet that will show the 0.txt resource. Under the text, there will be possibility of choice - choice 1 that open 1.txt and choice 2 that open 2.txt.
I don't know how to do this. I read help files but still dont get it. Its something about forms and commands I guess?
If you help me with this code, I will carry the rest out according to the scheme.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are various libraries on the internet for MIDletPascal… Unfortunately, most of them are on pages written in russian language only, but you can read them in english easily by google translate.
if the text files are in the JAR itself then yo need the openResource() function you can find it with example of usage in the documentation.
Put choice1 and choice2 option on separate lines in the text file, so you can use readLine() to read lines from resource to string variables and display them in a menu, or button, or just check keypresses.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
use readLine() to read lines from resource to string variables
how to connect readLines() to that string thing?
I have that:
program NewProject;
var res : resource;
byte : integer;
line : string;
index : integer;
begin
res := openResource('/0.txt');
if (resourceAvailable(res)) then
begin
byte := readByte(res);
line := readLine(res);
closeResource(res);
end;
showForm;
// I have to put somethhing there?
delay(2000);
end.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
programHelpForABeginner;varres:resource;line1,line2:string;cmd1,cmd2,clicked:command;i:Integer;beginres:=openResource('/0.txt');if(resourceAvailable(res))thenbeginline1:=readLine(res);line2:=readLine(res);closeResource(res);end;i:=formAddString('Select a command!');showForm;cmd1:=createCommand(Line1,CM_OK,1);cmd2:=createCommand(Line2,CM_BACK,2);addCommand(Cmd1);addCommand(Cmd2);repeatclicked:=getClickedCommand;untilclicked<>emptyCommand;clearForm;ifclicked=cmd1thenbegini:=formAddString('Selected:'+Line1);end;ifclicked=cmd2thenbegini:=formAddString('Selected:'+Line1);end;delay(2000);end.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Someone help me to make a MIDlet?
I want to read an SMS (nonstop) and send it to a URL
(http://…) and then delete it from the mobile memory.
Message sent contains the sender number.
Who helps me fix the price.
Thanks
Adrian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unfortunately, reading SMS, contained by mobile phone, is not possible via standart J2ME methods. That means that it may be avaible only to specific device models, where manufacter decided to drop security for potentially richer content range.
Additionally, you should provide a revision to your list of moral actions. Dumping phone messages to web server is not exactly a legal thing to think about. You should consider developing either some conscience or trust, depending on specific goal behind your wish.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to make MIDlet that will show the 0.txt resource. Under the text, there will be possibility of choice - choice 1 that open 1.txt and choice 2 that open 2.txt.
I don't know how to do this. I read help files but still dont get it. Its something about forms and commands I guess?
If you help me with this code, I will carry the rest out according to the scheme.
There are various libraries on the internet for MIDletPascal… Unfortunately, most of them are on pages written in russian language only, but you can read them in english easily by google translate.
Some libraries are here: http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http://midletpascal.org/index.php%3Foption%3Dcom_content%26view%3Darticle%26id%3D52%26Itemid%3D53
You need one on the JSR75 libraries to access the file system.
if the text files are in the JAR itself then yo need the openResource() function you can find it with example of usage in the documentation.
Put choice1 and choice2 option on separate lines in the text file, so you can use readLine() to read lines from resource to string variables and display them in a menu, or button, or just check keypresses.
how to connect readLines() to that string thing?
I have that:
Try it like this:
Hi,
Someone help me to make a MIDlet?
I want to read an SMS (nonstop) and send it to a URL
(http://…) and then delete it from the mobile memory.
Message sent contains the sender number.
Who helps me fix the price.
Thanks
Adrian
Hello, Adrian.
Unfortunately, reading SMS, contained by mobile phone, is not possible via standart J2ME methods. That means that it may be avaible only to specific device models, where manufacter decided to drop security for potentially richer content range.
Additionally, you should provide a revision to your list of moral actions. Dumping phone messages to web server is not exactly a legal thing to think about. You should consider developing either some conscience or trust, depending on specific goal behind your wish.