Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I've been working on a relatively small Android game app recently and after much optimization I can only get it down to use 20-30mb of ram. I was curious as to how some Google or Android apps can use so little ram. For example, on my S4 the music app rarely, if ever, uses more than 6mb of ram, even though it plays music and displays many album artworks.
The android developers website has a dedicated page for this issue. For memory optimizations I can think of the following points:
Re-use objects
Avoid static variables as easy work around as they cannot be garbage collected
Optimize your Bitmaps images contribute to a lot of RAM usage
Dont hold on to objects after they are not needed
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm working on an Android app (though eventually I'll want to do the same thing on iOS) and I'm looking to build an image recognition feature into it. The user would snap a picture, then this component of the app would need to figure out what that image is, whether it's a bowling ball, a salad, a book, you name it. It would also be helpful if it could figure out roughly how big the object in question is, though I imagine the camera focus values could help with that. The objects in question would not be moving.
I've heard of neural networks being used, but I'm not sure how this could be implemented, especially since I want to be able to recognize a very wide range of objects. I highly doubt this sort of processing could happen natively on a phone either. What are some solutions to this problem?
I would suggest you look at OpenCV. They have an awesome open source library for image processing and object detection. They also have great Android sample apps ready for testing some of their APIs.
http://opencv.org/platforms/android.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I need to process elements in large array and due to performance issues i need to do this in GPU of android device. please give a idea to implement this.
Please take a look at http://developer.android.com/guide/topics/renderscript/compute.html. There are also some other examples and sample projects using RenderScript online. Note that there is no way to reliably access the GPU on Android, because not all Android devices have GPUs capable of doing compute workloads. RS is the preferred method for accelerating parallel work.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I cannot seem to find a clear answer of when to use RenderScript?
Documentation says that we should use it when doing some computing or work with images. This is not so clear especially the part with images.
Can someone give me practical advices when to use it?
For example,
what computing are they talking about?
when should we use RenderScript dealing with Bitmap when there are other methods (or factories) which we can successfully use on such occasions?
Is RenderScript limited only to usage when coding games?
Its really pretty simple. If your application is doing a lot of cpu based data processing (i.e. in Dalvik or the NDK), and you would like a speedup, you should look at RS.
If you don't have a performance problem today I would keep doing what you are doing.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm creating a music player for Android. In that I want to give the feature of downloading album arts for songs.
I'm looking for an API that provides images of sizes appropriate for android devices, so that they do not take much space.
Till now I've stumbled upon Discogs but they seems to lack in documentation.
Please suggest.
Thanks
Discogs works fine. There are rate limits, but these aren't too low.
Also look at the combination of MusicBrainz and the Cover Art Archive, which has been growing steadily (about 34% of MusicBrainz releases, at the time of writing, have got CAA artwork). This tends to be higher quality than Discogs' art.
Finally you can use Wikipedia via DBpedia.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I had to accept a return on an Android app because the user told me it was not working on his Motorola Xoom. (The audio playback had some reverberation)
This is not a super high volume app, so I am not planning to go out and buy dozens of Androids to test it!
Also, it is an audio recorder app, so it does not work too well in an emulator.
How can I diagnose and correct the problem on the Xoom and in fact all other platforms, without investing a small fortune!
One thing you can do, if you're not averse to rooting, is installing different ROMs on your device. This will at least give you the chance to test on some different versions of Android and different UI skins (how many are available depends on your device).
I also read about services that test your app on different devices for you, but I'm not sure how much these cost.