Get all alarms saved in the alarm application here I have read there is no common interface to get all alarms in the system, due to different implementations of diverse clock apps.
Is this REALLY true ?! I think it is not possible to have no standard for such a crucial things like alarms ?
Is there no possibility for creating a universal widget that displays 5 next alarms regardles of the clock aplication ?
Is this REALLY true ?!
Yes.
I think it is not possible to have no standard for such a crucial things like alarms ?
If you are aware of any OS ever written that forced alarm clock developers to implement some common API, please point it out. AFAIK, this has never been a requirement since the dawn of the computer.
Is there no possibility for creating a universal widget that displays 5 next alarms regardles of the clock aplication ?
You could threaten all alarm clock application developers at gunpoint to implement your desired API. This may be illegal in some jurisdictions.
Or, you can offer some sort of reward to alarm clock application developers to get them to implement your desired API, such as in the form of cash (directly or indirectly, such as by helping them promote and monetize their apps).
I'm not saying that having such a common API is a bad thing, but developers have the freedom to write what they want. You either need to use carrots, sticks, or both to arrange for common standards, such as an API.
Related
OK, so I have done some research and the consensus seems to be that you can't update android:updatePeriodMillis programatically.
It seems that you have to use AlarmManager instead, which seems like using a sledghammer to crack a nut... odd that the API doesn't just let you update the core updatePeriodMillis.
There's always a slight risk with relying on what's out there on the web, since APIs tend to develop and old answers are no longer relevant.
So I'm just checking that this is still the case. For example, the guide at http://developer.android.com/guide/topics/appwidgets/index.html at least hints that it is possible to change the update period of the AppWidgetProvider. When discussing updatePeriodMillis it says:
"You might also allow the user to adjust the frequency in a configuration—some people might want a stock ticker to update every 15 minutes, or maybe only four times a day."
And then goes on to talk about using AlarmManager but apparently only in relation to avoiding waking the device rather than to changing the update period.
Thanks for any help on this.
So I'm just checking that this is still the case.
Yes, it is still the case that you cannot update updatePeriodMillis. Which is too bad, as I'd love to see an updateUpdatePeriodMillis() method. Particularly if this were done via some sort of builder or transaction object, implying that it too might be changed via an updateUpdateUpdatePeriodMillis() method.
:-)
It seems that you have to use AlarmManager instead
You could use JobScheduler on Android 5.0+ as well, though I suspect that you won't like that much either.
You could also allow the user to configure some multiple of updatePeriodMillis, then only do your work every N updates, though this isn't terribly efficient.
Or, you could not update your app widget periodically at all, instead updating it only as needed based on app functionality, rather than based on time. IMHO, this is what most apps should be doing.
What I mean is, is there a clock in the system that is maintained separately from the clock which is set by the user? I'm curious regarding writing apps that do some function once per day, and how the programmer keeps the user from just setting back the clock and spamming the function.
Look at the answer in this thread here. Looks like thats exactly what you are looking for
I have tried to code this with Android's included android.speech.SpeechRecognizer class with no success.
Basically, what I am trying to do is making my app constantly listen for one keyword that will fire an intent whenever the keyword is recognized. I know that this will use a lot of battery.
For example - you are talking with a person. Normal conversation. The phone is actively listening and recognizing every single said word and listening for the keyword.
Let's say the keyword is "cheese" in this instance.
Whenever you say "cheese," the application fires an intent that starts up another part of the app.
I have tried to use speech recognition as a service but things didn't really go as planned. Maybe I did a mistake, I don't know.
I've been trying to accomplish this for 2 days in a row now, for more than 24 hours work time combined. If I am being too broad or infringing any of SO's rules, I sincerely apologize and ask my question to be deleted.
My question is - how would this be possible? Of course the SpeechRecognition that is included with android itself would be preferable, but it definitely will be a hassle because it is not even designed to work for extended periods.
from my research, there is no way to do this using the standard google voice recognition server. They way it works is once sound/word is recognized, the recognizer returns a list of what it thinks it heard with an associated confidence score.
to do what you are asking, you would:
have to keep re-activating the recognition service every time it fired a recognition event, until it matches the word you want.
your app would have to 'keep-awake' the recognition service. you could do this by creating a service that periodically wakes up your handset and resuming the service/activity.
I would not recommend either of these options considering that the battery life is really reduces by the voice recognition service being constantly on.
Unfortunately, I do not think there are any native Android APIs that will fully suit your needs. I would recommend checking out pocketsphinx.
It is a pretty robust speaker-independent speech recognition API from CMU that is more intended for tasks such as this. You can also check out a tutorial for getting started here.
Google has not made API support for "OK GOOGLE" public and left it on vendors to change or pass the support to consumers.
I think best bet at this time would be build source code yourself and then call the API's. As an example below google library has low level details of implementing recognizer. I'm not sure why google does not made it public.
I don't see an easy way to implement and test it.
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.3_r2.1/android/speech/srec/Recognizer.java
I'm constantly trying new apps and my phone is getting cluttered with old apps, I no longer use. So, I thought I'd develop a simple app to help me out. There are similar apps, but none does exactly what I want:
I would like to have a list of apps which I've installed in the last month, which I've used X number of times (for easy access: They may be keepers!) as well as those I've not used in Y weeks.
Is there any way to get app usage statistics with Android? I guess ActivityManager might help me to gather that statistics, but is there a way to read just when an app has been used last? Or how many times in a given period?
Any tips will be most welcome :)
You can try out my app for uninstallation of the apps you don't need : https://play.google.com/store/apps/details?id=com.lb.app_manager .
Also, if you wish to find exact usage statistics of your apps, you can use my app this way: find "settings" (the app itself) inside the list (you can perform a search query), choose to make a shortcut of it, and then choose on the dialog "Usage Statistics". This way you can perform both the operations you wanted.
I also plan on adding this feature somehow in the future, but that's what you can do for now.
Here's a screenshot (it's the first on what I show here) :
I would like to know the correct way to monitor system events and operating system activity in Android. My research so far indicates there are various methods for running Activities, Services, BroadCastReceivers, etc. but I don't have an overall comprehensive answer for everything I want to accomplish yet. I did come across an app today called "Carrier IQ" and was wondering how they do it. I believe their app is built into the kernel or at least the phone's OS image, something I want to avoid doing if at all possible.
I know that the Android SDK offers various ways to obtain
Since my app cannot be allowed to be suspended, should it run as a foreground service? If I do this, will I consume too many resources if I need to poll for various activity? I ask this because I don't think I can get everything through receiving events (i.e., using a BroadCastReceiver). I think I need a combination of polling and events.
I want to log sensors, events, OS activity, etc. for a user study. This is NOT for hacking or phishing purposes!
These are the top three projects that I think may accomplish something similar to what I want to achieve, but I have not yet determined if they are viable solutions:
android-hci-extractor
cellbots data logger
android-os-monitor
Does the Android manifest permissions list contain all of the permissions your app will need?
http://developer.android.com/reference/android/Manifest.permission.html
Then you can just ask for permissions when the app is installed and you should be able to access them.