I'm using JCIFS in my new Android project. Somehow I've decided to use URL class to generalized the file path (so I can add more protocol later). What I did is as below
URL url = new URL("smb://192.168.1.1/filepath");
And then java.net.MalformedURLException exception is thrown.
Exception in thread "main" java.net.MalformedURLException: unknown protocol: smb
at java.net.URL.<init>(URL.java:184)
at java.net.URL.<init>(URL.java:127)
Consulting JCIFS FAQ reveals that I have to register the protocol before using the class. However I don't really know how to do so in Android. I think the library do this already, but it doesn't on Android.
So what should I do ?