Skip to content
Thomas Schwotzer edited this page Aug 27, 2021 · 71 revisions

Your app logic needs no changes

You application logic uses ASAPPeer or even better SharkPeer to deliver messages with your ASAP P2P network. Here is the good news. Both interfaces are available in Android if you use this library. The is no need the change a single line in your application logic.

The recommended way is this:

  1. Implement your application logic.
  2. Test it in a pure Java environment, see ASAPJava lib
  3. produce a lib (Produce JVM byte code. Go to your class files root directory. Produce a jar file with the jar command.)
  4. Setup a new Android project. Add your lib (beside others) to this project.
  5. Implement a GUI.

Suggested rules:

  • Your Android project only implements a GUI, no application logic.
  • You find a bug in your app logic (will happen) - go back to your Java program. Fix the bug. Produce a new lib and come back here. This procedure is much faster. It keeps your code split into application logic and GUI – separation of concern, MVC etc. are very effective principles. It gives you even the chance to implement an alternative (G)UI beside Android for your app if you like.

ASAPService - ASAPActivity

TODO

Clone this wiki locally