I created a T9 application updater for mobile but I have not been able to get access to the mobile phone's RMS.so I can't update the phones's T9 RMS. Please how do I go about this ?
You can't access the T9 dictionary from standard JavaME.
T9 is handled by the system software. When you add TextFields in your MIDlet, it is the system software that calls T9 functionality. You have no control of it from within JavaME.
It would require a special API to be able to access/edit T9 dictionary, and I don't think such an API exists. (If it does, it would only exists on very few phones).
Related
I need to restrict only a particular sim on a given phone (nokia 2700) such that the phone is not usable if the sim is changed. I'm thinking of either preventing the sim from registering on the network or having some background app that will shutdown the phone or prevent usage if the sim is change.
QT (new to it) and JavaMe suggestions are both fine.
How do I proceed with this?
Edit1:
The idea is to prevent the user of the phone from changing the sim card. The phone should not work if the sim card is changed. For this, I need a way of notifying this and either shutting down the phone or doing something to prevent it from being used.
regards
Qt is not supported on Series 40 phones. It is available for Symbian and MeeGo based Nokia phones. Check this list for supported models.
In order to achieve this you need to be able to detect a sim card and prevent phone from functioning if necessary.
On Series 40 JavaME, there are a few system.properties that you can use to detect the current sim card. There are no events for receiving the sim card change. Some of the properties are restricted to manufacturer and operator security domains. Unfortunately, com.nokia.mid.imsi which identifies a particular sim card is one of those. However com.nokia.mid.networkid is not restricted and should be sufficient to identify a particular network(If that is your purpose).
There is no JavaME way of blocking the use of the phone (I guess that is the point with Java security and sandboxing). Also the ability to start an app. at the boot and keep it running on the background is restricted to manufacturer and operator signing on Series 40 phones.
The phone should have this function already.
From the manual (page 12):
Access codes
The security code helps to protect your phone against
unauthorised use. The preset code is 12345. You can create and change
the code, and set the phone to request the code. Keep the code secret
and in a safe place separate from your phone. If you forget the code
and your phone is locked, your phone will require service and
additional charges may apply. For more information, contact a Nokia
Care point or your phone dealer. The PIN code supplied with the SIM
card protects the card against unauthorised use. The PIN2 code
supplied with some SIM cards is required to access certain services.
If you enter the PIN or PIN2 code incorrectly three times in
succession, you are asked for the PUK or PUK2 code. If you do not have
them, contact your service provider. The module PIN is required to
access the information in the security module of your SIM card. The
signing PIN may be required for the digital signature. The barring
password is required when using the call barring service. To set how
your phone uses the access codes and security settings, select Menu >
Settings > Security.
I used to have a Sony-Ericsson phone that had the same function and it allowed the access code to be saved on the sim card. The phone would not ask for the access code unless the sim was changed. I hope you can find the same function in the Security menu on your Nokia phone.
I wanted to create J2ME application, in which the application should work only with the SIM card that was used during installation. On SIM card (GSM) change the application should now work.
For achieving this, i thought of taking an signature of the simcard and save it in a persistent storage. On every start of the application the signature can be verified. Any idea of how to implement this.
Thanks in advance
The 'SATSA' (Security and Trust Services API aka JSR177) could be used from your J2ME application to communicate with the SIM. You could send '3GPP TS 11.11' commands to obtain the IMSI (select file DG_GSM, select file EF_IMSI, read binary).
Drawbacks are: (1) You're talking to the SIM on a relatively low level of abstraction (the ISO7816-4 layer); (2) Not all handsets support JSR177 at the moment.
I believe this is not possible. If it was possible with a specific phone it would not be possible in a generic way.
For ATT in US, for J2ME apps, the handset embeds "CarrierDeviceId" in the Jad file. This is unique per SIM card. So, if something similar is available to you, just read this Jad parameter the first time the app starts, save it to RMS or send it to server. Now each time the app starts, you can verify this number matches, and thus verify the SIM card is same.
You can also try obtaining the phone number that is tied to the SIM card and thus verify the old SIM is being used.
I'm trying to register a midlet for push registration, in order to wake up from a bluetooth connection.
The requested behavior is that the application will wake up when a car's kit (hands free) will be in the range of the device.
Is it possible at all?
If yes, how should it be done?
Thanks in advance,
I can confirm that it is possible to wakeup a MIDlet in Nokia Devices trough a registered service in the push-registry.
The registration can be defined in the JAD (static registration) or dynamically in the code.
Nokia phones S60 3ed and up and S40 3ed should support this functionality, on other phones (sony,samsung,motorola etc..) I didn't find this feature working.
Google this JAD attribute: MIDlet-Push-1
Good luck!
I don't think it's possible to start up a midlet when it comes into range of a device, even with Bluetooth push registry compatibility (were you to find a handset supporting it).
Your best bet might be to have a midlet running in the background, constantly checking which devices are in the vicinity. When it discovers your hands-free kit, you could bring it to the foreground (if the handset supports it; this is usually achieved by Display.setCurrent(null) for background, and Display.setCurrent(<Displayable instance>) for foreground).
JSR 82 provides the functionality you need.
Beware though, this constant Bluetooth polling will drain the device's battery!
This is advanced stuff. Nice.
While this can be available on mobile phones according to the JSR-118 and JSR-82 specifications, I suspect not many handset manufacturers have actually implemented it.
Symbian provided a TCK-compliant reference implementation for Java BlueTooth Push to its licensees but testing it is a nightmare and I don't know whether either Nokia, Motorola or Sony-Ericsson actually included the functionality in a phone.
My best guess of Symbian phones to try this on: Nokia N95, Sony-Ericsson P990 or W960, Motorola Z8. I would also advise trying on as recent a Bluetooth-enabled non Symbian Sony-Ericsson phone as you can find.
If you find a handset specification that actually says it supports J2ME BT Push, you then need to check whether that is supposed to work using RFComm, L2CAP or both. I don't know what your car kit uses.
As far as writing Java code to use Bt push, you can start by reading the example code in the 2 JSRs and the J2ME SDK from Sun Ltd.
I am writing a windows application (written entirely in C++) which reads files from a storage card on a mobile phone running Windows Mobile. The tough part is, I don't know how to make my application detect the event that a user has connected the mobile phone to the USB of laptop. I did some reading on MSDN and have written a small code using RegisterDeviceNotification, which detects whenever a USB disk is attached/removed from the laptop. However, I am unable to tweak this to make it work for phone type devices. Please help me out through any links/tutroials which explains this(preferrably C++, as I don't know .NET or C#).
Thanks
Alok
According to this article you can use RegisterDeviceNotification to get notifications when activesync detects a device has been plugged/unplugged. (See option 3 at the end of the article)
It may just be a matter of setting up the correct notification filter.
Windows Mobile devices use RNDIS, a network interface protocol behind the scenes. Hence, the RegisterDeviceNotification method still works, but you're looking for a DEV_BROADCAST_DEVICEINTERFACE, not DEV_BROADCAST_VOLUME. (i.e. dbch_devicetype==DBT_DEVTYP_DEVICEINTERFACE)
You can use RAPI or RAPI2 to detect when a Windows Mobile device connects to a PC via Active Sync or Windows Mobile Device Center. RAPI can also be used to read the files on the storage card and much more.
RAPI is simpler to program because it is a C based API. RAPI2 has more functionality than RAPI, but is an object oriented COM API. If your needs are simple and you only care about one device/connection at a time then RAPI is good enough. There are two RAPI functions used to detect connections: CeRapiInit (blocking), and CeRapiInitEx (signals an event upon connection).
How can I save data in mobile phone using j2me?
I want code examples which describes how to store data in mobile phones using j2me.
Further how to give access permission to read/write in mobile phones?
I am using netbeans 6.5 and motorola L6 phone.
Can any one tell me a code example giving how to store, give read/write permission?
You can save data in the record management store. There are some limitations though. The biggest one is that only your application will be able to read the data.
An alternative is to use the FileConnection API, which offers access to the device's file system. All modern phones should support it. However, unless the Midlet is signed, the user will be nagged to give permission to access a file.
Use the PDAPDemo example code from the Sun Wireless Toolkit.
Last time I checked it had a few error handling bugs but it is easily modifiable.
It will tell you what parts of the handset file system your application can read from and write to, both on the phone and on any eventual memory card.