Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the Spring Framework be used in android applications?

I am writing a android application which requires dependency injection in the data access API the application will need (I am implementing this API). I don't want to write the dependency injection manually. Therefore, I was thinking of using Spring. I realize that there are two versions of spring. A regular version and a android version. Can the regular version be used in the android application cause I just want the dependency injection functionality and already have the files.

like image 738
Mario Dennis Avatar asked Oct 18 '12 02:10

Mario Dennis


2 Answers

Spring has libraries for android but its for efficiently doing REST communication with some OAuth the detailed information is available here spring-android and the developers of spring advocate using RoboGuice for DI you can read about it from here, for hardcore dependency injection its RoboGuice which is by far the best out there.

like image 139
y ramesh rao Avatar answered Sep 17 '22 16:09

y ramesh rao


Don't. Spring is a heavy weight server-side framework that is not optimized for Android. The have some Android libraries, but those are for specific things like REST. If you need DI, use an Android framework such as RoboGuice.

like image 20
Nikolay Elenkov Avatar answered Sep 17 '22 16:09

Nikolay Elenkov