You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by jacob kelly <gr...@yahoo.com> on 2013/09/10 19:22:02 UTC

Help embedding into Android

Hello,

I have seen some people implement this server into an Android application, so I am trying to embed it into my own app. I have followed the tutorial, and the application runs, but it doesn't seem like it is doing anything. I feel like I am missing something. 

Is there any sort of framework needed beyond what is mentioned in the guide? I do have the .jar files, but do I need something more?

How do I determine the IP address to connect to?

I am fairly new to Android and very new to FTP, so any help would be hugely appreciated!

Thanks.

Re: Help embedding into Android

Posted by jacob kelly <gr...@yahoo.com>.
Thanks for the answer. I am now able to run the app and start the server. So far I am able to create the server on the phone, and I am able to connect to it from my desktop. The only problem is that I cannot log in to the server. I have tried using both admin/admin and anonymous/*, but they both fail. 

I had not been implementing the user manager, which was not allowing me to log in, since the server did not have any associated users. I am trying the code given at http://mina.apache.org/ftpserver-project/managing_users.html but there is a problem with creating or reading the myusers.properties file. When I try to run, I get the following error output:
09-13 16:00:58.279: E/AndroidRuntime(8885): FATAL EXCEPTION: main 
09-13 16:00:58.279: E/AndroidRuntime(8885): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.apacheftp/com.example.apacheftp.MainActivity}: org.apache.ftpserver.FtpServerConfigurationException: User data file specified but could not be located, neither on the file system or in the classpath: myusers.properties 
I am not sure what is causing this since I am using the exact code given in the example. I think I must be missing something.



As always, any help is greatly appreciated.

Thank you.


________________________________
 From: John Hartnup <jo...@gmail.com>
To: "ftpserver-users@mina.apache.org" <ft...@mina.apache.org>; jacob kelly <gr...@yahoo.com> 
Sent: Tuesday, September 10, 2013 2:20 PM
Subject: Re: Help embedding into Android
 


I don't know a great deal about Android, but in principle you shouldn't need to do anything different from standard Java.

I suggest you attach a debugger to your Android app and put a breakpoint at server.start().

Either the breakpoint won't trigger, meaning you need to find out why your code isn't being reached, or you'll be able to step through server initialisation, to see what exceptions (if any) are being thrown and handled.


On Tuesday, September 10, 2013, jacob kelly  wrote:

Hello,
>
>I have seen some people implement this server into an Android application, so I am trying to embed it into my own app. I have followed the tutorial, and the application runs, but it doesn't seem like it is doing anything. I feel like I am missing something. 
>
>Is there any sort of framework needed beyond what is mentioned in the guide? I do have the .jar files, but do I need something more?
>
>How do I determine the IP address to connect to?
>
>I am fairly new to Android and very new to FTP, so any help would be hugely appreciated!
>
>Thanks.

-- 
"There is no way to peace; peace is the way"

Re: Help embedding into Android

Posted by John Hartnup <jo...@gmail.com>.
I don't know a great deal about Android, but in principle you shouldn't
need to do anything different from standard Java.

I suggest you attach a debugger to your Android app and put a breakpoint at
server.start().

Either the breakpoint won't trigger, meaning you need to find out why your
code isn't being reached, or you'll be able to step through server
initialisation, to see what exceptions (if any) are being thrown and
handled.


On Tuesday, September 10, 2013, jacob kelly wrote:

> Hello,
>
> I have seen some people implement this server into an Android application,
> so I am trying to embed it into my own app. I have followed the tutorial,
> and the application runs, but it doesn't seem like it is doing anything. I
> feel like I am missing something.
>
> Is there any sort of framework needed beyond what is mentioned in the
> guide? I do have the .jar files, but do I need something more?
>
> How do I determine the IP address to connect to?
>
> I am fairly new to Android and very new to FTP, so any help would be
> hugely appreciated!
>
> Thanks.



-- 
"There is no way to peace; peace is the way"