Carlos Quiroz

Greenhorn
+ Follow
since Oct 27, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Carlos Quiroz

Hi
So you are calling in one class new ClassName() and get that exception? That is very strange.
What kind of class are you trying to instantiate? Perhaps you gave the class a forbidden package name like javax.microedition.XXX?
Regards
18 years ago
Hi
I'm not sure. I normally build using an ant build file where you can indicate that. I also use the antenna build tasks.
Hope it helps
18 years ago
Hi
Those properties are described in each API specification. You can get them going to the correct jcp page, for example for JSR-82 it is http://www.jcp.org/en/jsr/detail?id=82 and so on...
18 years ago
Hi
Many of the optional package APIs define that their version (and therfore presence) can be discovered checking a system property
For instance the JSR-82 Bluetooth API defines several properties including "bluetoth.api.version" which if exists indicates that the API is implemented in the device.
Similar properties are defined for the PIM API, File Connection API, etc...
Regards
18 years ago
Hi
Try compiling with the targetset to JDK 1.2 like
javac -target 1.2 .....
Regards
18 years ago
Hi
Try the alert class. You can display a message and have it on for a while ot until the user presses a key
Regards
18 years ago

Originally posted by Anuja arathi:
Hi Again,
Carlos, I was able to run a MIDLET which sends an SMS through "Run Via OTA". I feel the problem is with the MIDLET which receives SMS. Could you please run any sample MIDlet to receive SMS.
But my MIDlet which sends an SMS is stuck when i send the SMS to WMA console. If you have any sample code which is working can you send it to "r_anuja@hotmail.com". Thanks a lot .
Arathi.


You just need to create an sms connection and add a message listener
like this
connection = "sms://:4545" //some port number
conn = (MessageConnection) Connector.open(connection);
conn.setMessageListener(alistner);
When you get a message you get a message to you listener
Testing this is a bit more tricky but with WTK you can use the WMA console to send messages either text or binary. Enable the network monitor, that shows the sms coming in and out
Another simple tip is that if your MIDlet sends and receives messages you can send a message to your own number, in WTK that's typicallly +5550000
There are two examples of using WMA in Forum Nokia at
http://www.forum.nokia.com/main/1,6566,1_0_15,00.html
Regards
18 years ago
>I don't know how to unsign the MIDlet once signed with a certificate.
Basically just delete the MIDlet-Jar-SHA1 and all the MIDlet-Certificate-XXX
entries in your jad file
I think the WTK will also clean that when invoking the clean command
>I have executed another MIDlet (sms send/receive) which was not signed and >with security set to maximum. I am still getting the same error "OTA Error >Code (49) ".
Very strange. Can you install any MIDlet using OTA? I just tested my own sms midlet and worked fine
>Carlos, I have another question. I want to create a scenario, where the >user sends an SMS (to SMS gateway) and in response can I send a MIDlet ? Is >this possible?
That's a bit outside the scope of midlets. I believe is in general not possibl, but it should be possible using MMS. OTOH you could send an SMS that includes a url pointing to your MIDlet location
Regards
18 years ago
Hi again
For the second error try to remove the permission request (Again only for testing) and run the MIDlet
Then it has to run. Are you using WTK with which emulator? Sun's, Nokia?
BR
Carlos
18 years ago
Hi
The error you are getting is because the certificate used to sign is probably not obtained from a "well-known" certificate authority. I guess you made the certificate yourself?
In any case when you do that WTK automatically adds the certificate to its own CA list and that gives the impression that it works right away
If you only want to test, don't sign the MIDlet and set the security model to maximum.
18 years ago
Hi
For maximum compatiblity with the Nokia emulators do the compilation setting the target as 1.2
Something like javac -target 1.2 -classpath ....
Regards
18 years ago
Hi
It seems you may have WTK missconfigured. Can you check in which security domain are you executing the emulator? This is in Edit/Preferences/Security
If your security domain is minimum you may get that kind of errors. Try setting it to the maximum
Also adding the permissions to the jar is not enough. You have to also sign the MIDlet.
Hope it helps
Regards
18 years ago
Hi
Still I'd recommend proguard over retroguard (notice that they started with the same codebase). In particular because proguard can eliminate dead code
Also it seems retroguard is not in active development (I may be mistaken)
Regards
18 years ago
Hi
Probably you should be aware that when using BouncyCastle and the SecureRandom class some security exceptions may appear. That's because you are not allowed to create clases in the java or javax packages.
The best way to solve this is to use an obfuscator which will rename your classes and remove or change the package name.
As a side effect you get a small MIDlet since BC is pretty big (and useful )
Regards
18 years ago