EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Trouble with MsgConnect and Android

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
Posted: 04/26/2012 05:16:21
by Nicolas Ciezki (Standard support level)
Joined: 04/26/2012
Posts: 13

Hi !

I'm just trying to understand how to use MsgConnect. I'm interesting to work with Android.

For now, I wouldlike to send a single "Helloword" message from an Adroid's application to your Delphi's SendNote demo.

My Android Device and my PC are on the same local Network (Of course !!)

So I made this Activity :


/* Other imports */

import org.eldos.MsgConnectME.MCBase.*;
import org.eldos.MsgConnectME.MCSocket.*;

public class msgconnectActivity extends Activity {
    public void onCreate(Bundle savedInstanceState) {
        boolean b = MCMessenger.setLicenseKey("... /*Masked*/ ...");
        StringBuffer mess_erreur_buff = new StringBuffer();
        MCMessenger messenger = new MCMessenger();
        String S = new S tring("HelloWorld");
        MCMessage message = MCMessenger.createMessageFromText(1, 1, 1, S, null, false);
        MCSocketTransport transport = new MCSocketTransport();
      try {
         transport.setMessengerAddress(""); /*PC's IP*/
      } catch (EMCError e1) {         
      } catch(Exception ex){
         mess_erreur_buff.append(ex.toS tring());
         Log.i("MSG", ex.toS tring());
        try {
         messenger.postMessage("Socket:|SendNote", message, null);
         Toast toast = Toast.makeText(getApplicationContext(), "OK", Toast.LENGTH_LONG);   
      } catch (EMCError e) {
         mess_erreur_buff.append(e.toS tring());
         Log.i("MSG", e.toS tring());
        ((TextView)findViewById(R.id.Text_a)).setText(new S tring(mess_erreur_buff));

It crash on the transport.setActive(true) ... No Exception are throwed ... I joined the log.

I'm certainly doing something wrong, but what ? Thanks for the help !

PS: I'm french and pretty new on this, so my apologizes :-)
Posted: 04/26/2012 05:30:11
by Eugene Mayevski (Team)

Thank you for your interest in our products.

0) The log is missing.

1) We have SendNote sample for Android, did you test it?

2) You misconfigured the transport. TransportMode needs to be a client or P2P (you can leave it default, which is P2P), MessengerAddress is an optional property which is better left empty (until you understand that you need it).

Sincerely yours
Eugene Mayevski
Posted: 04/26/2012 07:12:20
by Nicolas Ciezki (Standard support level)
Joined: 04/26/2012
Posts: 13

Thank you for reply !

0) There is the log (sorry)

1) No, I didn't. Where can I find it ???

2) I did it but nothing changed...

[ Download ]
Posted: 04/26/2012 07:37:35
by Eugene Mayevski (Team)

You are using wrong library as the log indicates. Android doesn't support Java ME. Instead MsgConnect includes a separate code package for Android. It must have been installed to your computer if you downloaded the fresh version from the download page.

Sincerely yours
Eugene Mayevski
Posted: 04/26/2012 08:38:41
by Nicolas Ciezki (Standard support level)
Joined: 04/26/2012
Posts: 13

I downloaded the Java and Android Package (http://www.eldos.com/files/msgconnect/msgconnect_evl.jar)

I installed it an tried to execute the SendNote demo for Android with the "MsgConnect.jar" in the "MsgConnect\Code\Android\Core\" folder, but it crashed.

Here the log.

My colleague bought and download all packages. I tried to open "MsgConnect.jar" on the Java folder but it seems not to be an executable jar. So I tried to use it as a library but it's not working either. I've got this message :

The type java.beans.Beans cannot be resolved. It is indirectly referenced from required .class files

What should I do ?

Yhanks for the help !

[ Download ]
Posted: 04/26/2012 09:38:54
by Eugene Mayevski (Team)

Please check what you are trying to use. You missed Android version again.

Sincerely yours
Eugene Mayevski
Posted: 04/27/2012 03:36:55
by Nicolas Ciezki (Standard support level)
Joined: 04/26/2012
Posts: 13

Hi !

1ST :
We have reinstalled the JavaSE package (the registered one) :

- Run and install the MsgConnect.exe in C:\Program Files (x86)\Eldos\MsgConnect

- In Code folder, there is effectively an Android folder.

- So, in Code\Android\Core, there's a MsgConnect.jar

- When I use this jar as library in the Android SendNote Demo (C:\Program Files (x86)\EldoS\MsgConnect\Code\Android\Demos\SendNote), I can't compile because the error log tells me :
Project 'SendNote' is missing required Java project: 'MsgConnect'

I don't know what to do... What kind of MsgConnect project it's talking about ?


As I sayed, I downloaded the Java and Android Package (http://www.eldos.com/files/msgconnect/msgconnect_evl.jar) :

- Right-click and open the msgconnect_evl.160.72.jar file.

- The IzPack - Installation of MsgConnect (Java and Android) start

- I installed all in C:\Eldos\MsgConnect

- I opened the SendNote demo in C:\Eldos\MsgConnect\Demos\Android\SendNote

- To try to run it, I linked the MsgConnect.jar witch is in C:\Eldos\MsgConnect\Code\Android\Core

- The compilation goes well, but the application just crash. The logcat tells me :
java.lang.ClassNotFoundException: org.eldos.MsgConnect.SendNote.SendNoteActivity in loader dalvik.system.PathClassLoader[/data/app/org.eldos.MsgConnect.SendNote-2.apk]

- I also tried to link the jar file in C:\Program Files (x86)\EldoS\MsgConnect\Code\Android\Core, same result...

I'm blocked... :-(
Posted: 04/27/2012 04:45:28
by Eugene Mayevski (Team)

If you have a license, please assign the license ticket to your user account before we continue. The ticket itself and the procedure of it's use are specified in the registration e-mail that was sent to you upon license purchase.

Sincerely yours
Eugene Mayevski
Posted: 04/27/2012 05:23:47
by Nicolas Ciezki (Standard support level)
Joined: 04/26/2012
Posts: 13

It's done.
Posted: 04/27/2012 06:05:05
by Eugene Mayevski (Team)

About the sample - right now you can study its source code to see how components are set up. I will check the demo from the installation in the evening.

Frankly speaking all this open-source is a nest of bugs, with eclipse being one of the leaders. I have no single idea how compiling the file SendNoteActivity.java can lead to this class not being found.

Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.



Topic viewed 13988 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!