STRaND and PhoneSat programs have attracted the attention of the aerospace community by applying, in CubeSats, commercial off-the-shelf smartphones based on Google's Android. In Android, the development commonly applies Java hence this language is a natural candidate for the attitude and orbit control subsystem (AOCS). Moreover, such AOCS can be designed with success by linear control theory; however, the linearized models are not able to represent all the effects of the nonlinear terms present in the dynamics. Therefore, nonlinear control techniques can yield better performance. An example is the Nano-Satellite Constellation for Environmental Data Collection, used as the reference in this work, a set of remote sensing CubeSats from the Brazilian National Institute for Space Research, in which the AOCS must stabilize the satellite in three-axes. We present the investigation of a state-dependent Riccati equation (SDRE) controller, a nonlinear controller, based on attitude errors given by quaternions. The investigation uses Java, accordingly, it can run on an Android operating system in a CubeSat, and it has low cost. Two controllers (linear and SDRE) were evaluated using a Monte Carlo perturbation model. The initial results show that the SDRE controller provides better performance.