Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How create a interface between a J2ME and a synthetizer ?  RSS feed

 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am looking for a solution to create a interface between my application J2ME and my synthetizer (embarked on the handset) written in C/C++.

The synthetizer is developped by my company in (pur) C/C++ for some manufacturers.It take a midi file like parametre and plays it.I am looking for a solution in order that my J2ME application it to communicate with this synthetizer.

I can ask to synthetizer's developper to developp a API for J2ME to acces the mobile's resources(filesystem).

How create a API from(synthetizer C/C++) that I can use from my J2ME application? Or What do I ask to the handset's manufacturer in order to use their API from my J2ME application.


OULD NADIF
[ February 01, 2005: Message edited by: Michael Yuan ]
 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be clear, Let's take a example:
So I create a api.jar which I ambark on the handset:

How to put it in my Classpath from my J2ME application?

OULD NADIF
 
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OULD,

Please do not address the question directly to me. I would prefer to maintain this as a community site. So, I removed the "Urgent Michael" from your original subject line.

Since MIDP does not allow native methods, I do not think you can access the C/C++ program on the phone.
 
Ould Nadif
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Michael and you are right,


About my problem, Let consider that I am a manufacturer of mobile like Nokia or Siemens so on ...
if some manufacturers like Nokia(for example ,nokia-ui API) or siemens(siemens-extension-api) etc ...could create their owner API to exploit some specificities of their handset, then I may do it too.

How do they do ?


OULD NADIF
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, they control the JVM and can hardwire things into the C code for the JVM before they compile. In fact, the CLDC allows "native methods" for manufacturer or operator only -- as a security measure. Unless you can re-compile and replace the JVM on the device, you cannot use native calls from your j2me app. I do not like it but this is the way it is setup.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!