How to select a file on Mobile MIDP using J2ME? - java

I want to select a file on mobile using J2ME but I don't know way to do it. Help me, please !

You have to use FileConnection(JSR-75) for this. See this links for your reference.
How to Access Local File Systems from J2ME devices using FileConnection API
File Connection Using J2ME api JSR 75

If what you're looking for is a file selection UI component, I'm afraid this does not exist by default in J2ME, and you'll have to create your own.
Such a component is planned for MIDP3, however good luck finding any devices which support it!

Related

Using Ionic with Smart Card (Java Card)

Good day,
I have a project on building mobile app that read and write data to a smart card (java card),
in form of text as a storage using a USB connector to an android mobile phone to communicate with the card.
But i know Ionic (cordova/ Javascript) does not have a plugin to read/write with smart card
My research show that it can only be done with java, But i do not want to design the app from ground up
using a native language cos i have loved working with ionic - cordova.
i need a help on ways to make this work, i dont want to believe that it is not possible,
i need a resources, technic, materials that i can use to make this possible.
Thanks
If you cannot find a preexisting solution then you would have to plugin your own for the platforms you require. There seems to be an NFC plugin which can form a starting point on how to build such a thing.
You could use the seek-for-Android project as base to build your own API. In the simplest form you could just decide to make a port: basically copying the API into Cordoba.
Note that all this may not be easy. Good luck.

Has anyone worked with NFC with Java, javax.microedition.contactless?

I have been trying to look into this and it seems hard to find good solid info. Is there anyone out there that has created any java packages that interact with NFC phones, cards, etc. I haven't been able to find a lot on how NFC works really. I just want to be able to read the id of the phone, or its phone number, when it scans. Any way to do this?
I was reading this:
http://java.sun.com/developer/technicalArticles/javame/nfc/
which mentions the package javax.microedition.contactless
but can't seem to figure out how to implement it. I am not great at Java, only in my second semester. This over my head?
The Android has own Java API, which differs from JavaMe. This applies not only to NFC, but also to other areas. The above mentioned API you can use on JavaMe NFC enabled phones like Nokia 6212, some Samsungs and Sagem.
If you plan to use NFC I suggest you to either use the Android - there are 2 widely available NFC phones on the market or Symbian, where is dozens of models already released. The other option is go with RIM BlackBerry.
BR
STeN

how to convert j2me running lwuit to android?

How can i convert a J2ME application which is using lwuit library to an android apk ?
I tried to convert using mircoemulator but when I start the application it shows error and exits.
Read this article, LWUIT for Android. Here clearly telling about How to do LWUIT with Android. Follow the stpes carefully and change the your MIDlet code. Just checkout the LWUIT-Incubator repository and use this for android development with LWUIT. Also read the README_Android.txt on this repository.
There's no way to make a direct conversion. Strictly speaking, you can make a port, adapting the code, or use some emulator or wrapper to run the CLDC/MIPD classes.
The guys in Opera also used MicroEmulator for OperaMini.

iCalendar implementation on android?

I want to hook up an application to work with the iCalendar format for calendering. Is there native support in the Android SDK for this? If not, is there an open source library anyone is familiar with?
Thanks
There is ical4j to parse ics file in java. see https://ical4j.github.io/ (or google it if they move again and the link is no longer valid)
As far as I know there is nothing to prevent it from working with android

How easy/difficult it is to create app to send text field to sql for Android?

I have basic knowledge of Java but have never developed for Android.
A friend asked me for an app that seems easy enough to develop but I would need some help for Android.
All the app needs to do is send a text field (for example license plate number) to a predetermined SQL Server database.
Is this easy in Android as it sounds?
Thanks in advance. Cheers.
Darko.
That should be easy, but does it need to be a full-blown Android application for that?
Sounds like a simple webpage with an input-field and a submit button would do the job as well.
If you're familiar with using databases from Java the task is very simple. Just write the code that sends a string to a database. The exact same code you would use on a desktop Java application will do.
The rest is a matter of defining your user interface and obtaining the string. There is a good basic tutorial you can use on the Android developers web site: http://developer.android.com/guide/tutorials/notepad/index.html.
The number of code lines in the whole application will be in the range of a couple of dozens.
It sounds like you want the license plate information stored in a separate server, but if you also wanted to store some information on the device itself there is a simple Notepad tutorial provided by the Android Developers site that explains how to setup and utilize an SQLite database on the device. This by no means would replace the functionality of a server, but is another Android feature that is at your disposal.

Categories