This phone have something very useful. That is his option to schedule power on and off.
Another useful application standard, well hidden in submenus is
Schedule Power On / Off, which can set the phone to power on and power
off automatically at a certain time, and also at fixed days of the
week.
But how can I check programmatic-ally if the phone have schedule option ?, Is it possible to check this at all ?, or maybe even change the time programmatic-ally ...
I meet scheduling for a first time in the specifications of an android phone, I hope this will become standard cause it is really useful option(at least for me).
Edit:(this phone is not android)
This is manufacturer dependent, I found android phone named 'privileged' that have this option but no HTC phone have this option for scheduling , son generally this not android dependent feature it depends from the manufacturer and there is no handy api for this
Related
Hi i have a swift app that communicate with a BLE device with a beacon.
When i kill the app the beacon wake the app in background and it connect to the device and start communicating.
The interval of detection / connexion mostly take between 30 sec to up to 1 min after i kill the app. but sometime it take like 3 4 min.
Did anyone faced such issue and have an idea of whet could be happening it's the same process why it vary from time to time did it have a relation with the device itself ?
thx
Since iOS is closed source, it is impossible to say with certainty why delays in beacon detection happen. This is especially true in individual cases -- there are lots of variables.
However, we do have some ideas of how iOS CoreLocation manages to detect beacons based on reverse engineering, and I have some insight on based on building the Android Beacon Library which uses similar concepts.
Here is what we do know:
CoreLocation uses BLE hardware filters for pattern matching to get detections as quickly as possible. If a hardware filter slot is available, beacon monitoring will use the Bluetooth chip itself to look for a pattern first matching. This will give you a detection in less than a second when a beacon first appears.
In some cases hardware filters cannot be used (they are exhausted) or the beacon is known to be in the vicinity, so it is ignored. In these cases, a periodic backup scan is used to look for beacons.
The backup scan happens at different rates depending not the state of the phone and the beacon/bluetooth scanning state of apps running on the phone. If no apps are actively scanning and the screen is off, this can be every few minutes.
When the screen is turned on, it typically triggers a backup scan.
If your app is visible in the foreground and using ranging APIs or actively doing a BLE scan with CoreBluetooth, it is scanning at a 100% duty cycle.
In other cases, the duty cycle will be lower. If you are testing with a beacon that does not advertise frequently (e.g. less than the 10Hz in the iBeacon spec) it may miss detections at 10% duty cycle scan.
A few things to consider based on your description:
You may have exhausted all of the BLE hardware filters on your phone, and your app may not be getting one. Unfortunately, this optimization is completely hidden, so there is no way to tell for sure. You can increase the chances of getting a hardware slot by uninstalling any apps you think may be scanning for Bluetooth, then uninstalling and reinstalling your app, and restarting the phone. If all else fails, do a factory reset on a test phone.
Whenever you reboot your phone, it takes much longer for things to be fully booted than it appears. Location services are amongst the last things to be fully initialized. Always wait 5 minutes after reboot before doing any time-sensitive testing.
It takes time for iOS to detect it is in an out of region state with a beacon. This is typically 30 seconds if the app is visible on the screen, but if it is not, it may take significantly longer because of the timing of backup scans. And you cannot get a new region entry event if iOS doesn't realize you have exited yet.
If you kill your app when a beacon is visible (or when it had recently been visible) iOS may not know the in region / out of region state. If it thinks it is in region when it is not, it can take a long time to figure out it is out of region.
I like the idea behind bump, and I am using it in an application. However, I'd prefer it if I would be able to make a connection between 2 phones (in close proximity) without the users having to bump.
I have tried simulateBump which works pretty good for that purpose. However I don't want the Bump framework to be activated when it thinks the phones are bumped.
So, how could you disable 'bumping'?
Also, one extra questions: Can I stop the bump framework from triggering a vibration on the phone when the phone is bumped?
Just so others know what Andrei is talking about - Bump allows two smartphone users to physically bump their phones together to transfer contact information, photos, and files to each other over the Internet.
Now that the context is clear, These are the exposed API's by Bump - Bump API for iOS. According to this -
When phones are bumped and if you have included the Bump SDK in your app complete with delegates, Bump framework will be activated when 2 phones bump. If you dont want bump to be activated then remove bump handlers (like configureWithAPIKey etc.) and implement you own. Although I see a BOOL flag called bumpable. This is defaulted to YES. Maybe if you set this to FALSE and see how it works out.
I dont see any API to turn off vibration when bump happens.
I am purely basing this on my observations of their header file. Not tried this in xCode. So I might be wrong.
Also, if you are interested in peer-to-peer data transfer you might want to take a look at GameKit, its a cool piece of tech part of iOS framework..
I have Android application where service running 24/7 Phone get's GPS position every 5 minutes and sends to server. This is requirement.
Can I write same service for iPhone? I'm not sure if it's possible.
Can I write same service for WP7? I think it wasn't possible to run service before. Did anything change in 7.5?
EDIT:
I'm not sure why somebody downvoted. This is concrete Yes/No question.
It is possible in WP7 with the introduction of background tasks in Mango. In fact, there is a built in mechanism for polling the GPS provided by the API that is more battery efficient.
Not sure if it goes down to 5 minutes, think it is something larger like 30 minutes. It is also not comparable to a Windows Service - so don't go fowards with that mind set. Background tasks are heavily constrained to keep the phone responsive for the user - to make use of them, you need to play nice with the requirements.
Background tasks introduction, it also talks about the GPS thing I mentioned. The entire series is well worth your bandwidth and time downloading and watching:
http://channel9.msdn.com/Series/Mango-Jump-Start/Mango-Jump-Start-06-Windows-Phone-Multi-tasking--Background-Tasks
Can't answer for iPhone.
It is also possible on ios4+ but it wont be time-triggered. Either you register for precise (gps) or vague location (wifi and wan location) which is available to get in background but it is not always possible to send that data to a server because after 10 minutes in background your app is not allowed to keep a network-connection alive. So you have to buffer that data and have to wait until the user launches your app.
The ios pushes notifications to your app depending on the needed accuracy and depending on a distance-filter
ios-apps do not differ between services and activities (like in android). it is all combined in one app.
There are "some limitations"(a lot) here too, but maybe Microsoft Push services works for you:
Push Notifications Overview for Windows Phone
Because polling is not a good practice for this, push works better in this cases.
In WP7 Mango you can't get a fresh location from a background agent. The following code will return the latest available location (up to 15 minutes old):
private GeoPosition<GeoCoordinate> GetCachedLocation()
{
GeoCoordinateWatcher geoWatcher;
geoWatcher = new GeoCoordinateWatcher(); //Start a new watcher with default level of accuracy
geoWatcher.Start();
//Get latest cached position
GeoPosition<GeoCoordinate> position = geoWatcher.Position;
geoWatcher.Stop();
return position;
}
As you can see, this uses GeoCoordinateWatcher. According to MSDN (http://msdn.microsoft.com/en-us/library/hh202962(v=vs.92).aspx):
This API, used for obtaining the geographic coordinates of the device,
is supported for use in background agents, but it uses a cached
location value instead of real-time data. The cached location value is
updated by the device every 15 minutes.
Other than that, I haven't been able to find much information. You could create a GeoCoordinateWatcher with a self-defined accuracy, but I haven't tested this. Perhaps it would return the latest available cached location that satisfies the accuracy requirement.
Hi im still not 100% with xcode and android. I have the Droid X and I code with Xcode. My dad is on the Fire Dept. and wants me to code an app for either the android and/or iphone that detects the dispatch's radio signal and receives it and streams it in the background so the firemen could listen to the radio on their phones so they wouldn't have to carry their bulky radios with them everywhere. If there is someone that could help me or point me in the right direction, I would greatly appreciate it.
Thank you, Halokllr
Some bad news Halokllr, the iPhone doesn't have a radio chip, and the FM radio included in some Android models will probably not be able to physically pick up emergency broadcast signals. In order to do what you are suggesting, you would need a web service of some kind that already exists and streams audio for the emergency signals you're interested in. Now there ARE some services like this, though I would strongly suggest that if it is intended to be used for actual first responders that you very carefully research their timeliness guarantees. Some of them may be hours behind live events. Check out http://www.radioreference.com/ as an example service provider.
I know this question is not programming related, so for this I made community wiki. Developers are the best guys to answer the question.
I am addressed to those that do development on devices that runs on batteries, like phones, gadgets etc. Probably you are constantly develop for them, and therefor they are always plugged in and charged at 100%. We develop mainly for smartphones and we have devices that were always above 90% charged in the last month or so.
If a battery is always charged, it degrades it life cycle, so what steps you do to ensure decent battery drain to maximize the life of the batteries.
I think you're talking about "battery memory" which affect NiCd batteries. Most devices use NiMH or LiIon, which doesn't have the problem.
Keep it unplugged sometimes. For a laptop, you can use the laptops battery just fine. For a mobile device like a phone, this is a little more annoying because you are trying to upload to it fairly regularly (but not constantly).
Use the spare. Have a 'dev' battery that you use when constantly plugged in. When done developing and ready to show off your new fart widget to all your friends, just swap the battery out.
Here's a good write-up on Lithium-Ion batteries too:
http://www.batteryuniversity.com/parttwo-34.htm
I'm developing for mobile phones so often that i have phones only for the purpose for devloping of them. So I don't care about the battery. And if I'm missing to seen a low memory screen, I use this app, to get the feeling back ;)
I don't really see a problem. If you're really professional you need 1 or even more (e.g. to simulate network etc) mobile phones for the sole purpose of developing. And if you use the phones also for your private purpose, the the battery will decrease anyway during your spare time.
There's nothing you can really do about it.
With some older devices, it was possible to use them with the battery taken out if the charger was in (how most laptops currently work), but this is very rare.
The best you can do is to unplug it whenever possible (there must be times when you're coding for long periods of time or doing other stuff and don't need the device plugged in).
Also, don't charge it overnight if you know it will be in the charger the next day.
Remember, though, many new devices use Li-ion and Ni-Mh batteries now, which are much more reliable than their Ni-Cd counterparts on this front, so you are unlikely to see deterioration as quickly.
To minimize the loss of Li-ion battery capacity over time:
Keep your devices not plugged as long as possible to have minimal charge level.
Keep your batteries as cool as possible.
You can also remove batteries if your device doesn't require them to operate and store them in a cool place.