I am not 100% sure about what you are trying to do, but lets see if I can help.
There are 2 scenarios, connected to the ArcGIS server and Not connected.
1) So when you are connected to the server, your custom mobile device is able to create a route from point A to point B? How did you do this? How is it working? Why does it need to be connected to the server?
2) Now you want to create a route in a disconnected environment, with no connection to the server. Once again, I believe it depends on the layers, why do you need to be connected to the server to do this?
In other words if you create a cache of the data you are using, then your mobile device should be able to perform the given task.
The problem I am having trying to understand is how is your code generating a route (Yes I know network analyst) and why does it need to be connected to the server if you can cache the data locally and query that instead.
Hopefully this helps in some way.
Cheers,
Akhil P.