i have search alot to find how to implement the location listener in the Android background service but didnt find any proper answer. i want to run a thread in background service to find throughput and location together. can any body show me by writing small piece of code that can find these values.( a tested one).
thanks very much in advance
I've used "little-Fluffy-location" and it's great!
I can hardly feel the battery consumption, and it was easy to use.
http://code.google.com/p/little-fluffy-location-library/
Related
I am trying to build a monitoring app using LUA in corona labs. I was wondering how I would go about doing that.
Background: the app should notify the user when there is another app or outside third party accessing the camera/microphone.
I'm thinking trying to get access to the devices resource manager and it notify the app when the camera and microphone is being used.
I haven't come across anything like this before. Am I on the right path? Or am I way off? How would you go about doing this?
I'm not expecting a definite answer, just a nudge in the right direction :)
In general this kind of behavior is not what Corona is designed for. You would likely have to use native tools, or Corona native if you want to use corona for your UI, to access this kind of data.
There is an interesting discussion about how it can be done in Android here How to check whether microphone is used by any background app, hope it helps!
I'm developing an app that runs in the background that essentially snaps a front facing photo every time the phone is successfully/unsuccessfully unlocked. This isn't an original idea, but I'm developing it as a final project for my college android programming course, with no intent to sell this app. I have a general idea how I am going to go about this via some research but I keep running across a problem.
I know that it is hard and bad practice to run an app continuously in the background, so the idea is you put the app to sleep and set an alarm. My problem is that if the would be phone-snooper were to get really lucky, they could access the phone in between the alarms, and the owner of the phone would never know. I talked with my professor, and he proposed a couple ideas, but we could not come up with a definite solution, so I'm asking opinions here. Any idea how to subvert this dilemma? Thanks a ton.
Your approach is probably not appropriate for the problem. You can't "time" unpredictable events (like someone attempting to unlock a phone). Or else it's not clear how you are setting the alarm.
You should change the approach to an event-based approach.
Either provide a service for a lock-screen app so that it can use your code to capture a pic by sending login attempt events to it. You write that and provide an SDK/API.
Or else create your own lock screen app with your feature:
https://stackoverflow.com/questions/10864300/create-a-lock-screen-of-my-own
I would make an application that handle the volume buttons when screen is off. The goal would be to turn on or off the front LED.
I know that there many topics here that talk about it, but the recommended solutions (like PARTIAL_WAKE_LOCK) seem to be energy intensive and drain the battery very quickly!
What I want is a solution that is as energy efficient as possible. Is this possible? Maybe some kind of hooking?
Please note that the solutions based on scheduled tasks can not be envisaged for this project because I want detect keys in real time (or close to it)!
Take a look at this question.. if you already haven't ..
Just to make one thing clear. If something is not documented in API docs of android then any hack or workaround you find won't be reliable as Google may decide to change things in future releases, for example there is nothing documented about creating shortcuts after the app is installed ! But Since Android source code is available, developers took that piece of code as how was playstore creating shortcuts.. but its not documented so Google may change it in future !
I'm trying to write an Adroid application that should run in background and notify the user when he will be close to the place given in the database. Should I do it by requestLocationUpdates in the extended IntentService class?
What is the best way to make it as least battery draining as possible?
Reto Meier has written extensively on this topic : http://android-developers.blogspot.in/2011/06/deep-dive-into-location.html
There is also a section on Optimizing Battery Life at the Android Developers site: http://developer.android.com/training/monitoring-device-state/index.html
I have just started Android Development, I want to make thread in my application which get the current location after every thirty seconds. Kindly give me some hints or any tutorial link which you think is useful for this problem.
Basically you need to create handler and update the gui every thirty seconds using that handler. For more info how to update the gui click here. For more info how the get the location read this android get location from best provider available
This is a good place to start. Note that if you are new to Android development you will find a lot of good resources at the Android website. Start there and maybe grab a good book on threads in Java, this one is very good book for that.