4

I'm an amateur developer and I'm creating an Android app that will perform long mathematical calculation (involving multiple for-loops for example). I've read on the Android Developer website that Renderscript is a possible way of reducing computational time and memory. However, I have no readability (or writability for that matter) in C, so I was wondering if there's any more effective (time/memory) ways of carrying out the computations.

Otherwise, if there's really no other ways, are there helpful resources for me to look besides the Renderscript section on the Android website?

user1246462
  • 1,228
  • 3
  • 11
  • 20
  • you can use AsyncTask or Thread – Vishal Pawar Aug 30 '12 at 13:38
  • 2
    What about doing the computations on a server and sending back the results to the Android device? – Vitaly Olegovitch Aug 30 '12 at 13:39
  • Android terminals are not usually adapted to long computations because of limited energy supply. A server-based solution seems more adapted, and more scalable by using distributed architectures. – SirDarius Aug 30 '12 at 13:43
  • Would the Google AppEngine be a feasible option as the server for doing the computations? If so, what's the mechanism for sending and receiving data from AppEngine in the Android device? – user1246462 Aug 30 '12 at 14:06
  • Renderscript was deprecated in jelly bean – Raghav Sood Aug 30 '12 at 14:29
  • Is it possible that you are only assuming that it will be slow and memory intensive? Have you tried anything? Remember that communicating with a server also uses energy, takes time and may fail. You should only consider the server option if you are sure that computing on Android is the worse option. – vikki Aug 30 '12 at 14:40
  • @RaghavSood Renderscript isn't deprecated. Only graphical part which duplicated OpenGL. – pawelzieba Aug 30 '12 at 14:57

2 Answers2

2

You have two choices to compute directly on device:

Renderscript:

  • (+) Supports different types of current and future architectures.
  • (+) It will enable computations on GPU in future.
  • (+) It is easily scalable to run on multiple cores.
  • (-) Minimal API level 11.

Android NDK:

  • (+) cross-platform code
  • (-) Application have to be compiled for each available architecture by developer.
  • (-) If new architecture emerge then new build is needed.
pawelzieba
  • 16,082
  • 3
  • 46
  • 72
0

What about doing the computations on a server and sending back the results to the Android device?

You can implement a RESTful service server side and call it via http from Android.

Community
  • 1
  • 1
Vitaly Olegovitch
  • 3,509
  • 6
  • 33
  • 49