Titanium iOS auto restart application in background once swiped off from background - ios7

I am working in an application that detects any Beacons nearby and gives and alert in the form of local notifications for iOS. I used TiBeacons library for titanium which did the work but I am right now stuck with an issue where I need to keep the Application running even when the user swipes off the application from background.
I was able to make it work in background which is the paused state,but is it possible to make it restart itself in the background when the user swipes the app from the background processes running,maybe with a delay if not promptly?? Thanks

There is no way to restart application after user removed it from a memory. This would be huge security bridge allowing developers to do lots of evil things to customers' devices.
You can run your code only when app is in foreground and background but never when it's killed.
You can try activate your app by receiving notification from Apple Notification Center Service:
The purpose of the Apple Notification Center Service (ANCS) is to give Bluetooth accessories (that connect to iOS devices through a Bluetooth low-energy link) a simple and convenient way to access many kinds of notifications that are generated on iOS devices.

The ability to detect iBeacons after the app was killed in the task switcher was only added in iOS 7.1. Also, I believe this functionality requires that beacon monitoring be set up with the app's main AppDelegate object as the CoreLocation delegate. I do not know much about Titanium, but glancing at the source, it appears it does not do this, and instead uses a different class as the CoreLocation delegate. This may explain why this does not work for you.
If my suspicion is true, you would not be able to detect after the app is killed using an unmodified version of that library.
Since I am not a Titanium expert, it would be best if someone who knows more about it could confirm or refute my suspicion.

Related

WatchOS app keeps crashing when being opened from remote notification

WatchOS app works normally if being opened from home screen. If I try to open it from remote notification screen (by tapping title label) two app behaviors can be spotted:
If application was loaded previously (I don't know how to name it, maybe better to tell that app is not killed by system or still present in memory). In this case application will load normally and do some action if asked (for example open some Interface Controller and show remote notification details).
If application was launched long time ago (or killed by system, unloaded from memory, in my case I'm stopping it in Xcode). If app receives remote notification in this state after tapping on title label of notification scene it will try to load for some time and finally crash (this may take 1sec or 1min). Or it will stuck with loading indicator shown - what is interesting that in this case if I'll try to attach watch extension process to Xcode debug it will show that app is launched and works (for example I can send some data from parent iOS app and watchOS app will receive it - triggered method in Extension delegate and do some stuff).
Googling I have found that watch apps can be killed by system if they take to much power when being launched, so I tried to remove any load while app is starting itself but with no success - it still keeps crashing.
The only close to mine situation that I've found so far was a topic in apple developers forum:
https://forums.developer.apple.com/thread/20553
I have been spotting the same logs like in topic when watching how watch app behave in Xcode/Devices, but after updating to WatchOS 3 (now 3.1 beta) and using new Xcode 8 (now 8.1 beta) I can't see any logs from WatchOS at all (just some system messages that watch screen was turned of and on).
Have any one spotted such issues while working with watchOS remote notifications? Any suggestion where to search for solution?

Can an iBeacon notify a user's iphone without an app being installed?

I'm new to iBeacon's and am trying to understand one simple thing.
Can I use iBeacon to display a notification on a user's iphone without a custom app being installed?
For example, I'd like to build an app that sends out iBeacon messages to people that have an iPhone. When they get near an iPad running my app, it notifies them that they're near my "event", which of course is taking place at the location of my iPad.
Is this possible without the user having already installed another app that I've made to receive notifications of my event?
Note that I'm open to any other tech or ideas that would make this work. I know that Apple does this with their Apple Stores, but I'm guessing they can do this because they already have an app installed on the users device - probably the "AppStore" app.
You typically need an app for any iOS notifications on seeing an iBeacon. That is what Apple does for their stores.
The only exception is if you use Passbook to set up a notification trigger. But you still need the user to install your Passbook entry.

Is it necessary to start a windows 8 app at least once to enable background taks and/or push notifications

I understand how i can tie my application to the windows push notification service but the code i have to write to do so will only be reached when my app is started by the user. What if i want my application to receive push notifications when it has just been installed ?
the same question applies to background tasks
Setting up push notification channels and background tasks does require and app to be run at least once. You can, however, set up periodic notifications in Windows 8.1 through an entry in the manifest, so that you can have a live tile experience after install but before the app is run. If you do that, you can at least surface some info on the live tile right away to invite the user into the app, after which you can customize the experience much more with push notifications and background tasks.
You can find the periodic update URI field in the manifest editor's Application tab under Tile Update. The XML schema ref is here: http://msdn.microsoft.com/en-us/library/windows/apps/dn391689.aspx.
Who will install the background agent or create push notification channel in this case? Yes, it should.

Appcelerator Titanium - how I can open a window at a fixed moment of time

I'm a newbie in using appcelerator titanium, and I'm using this platform to create an alarm application. But I'm facing with a problem. I don't know how I can open an application's window at a fixed moment of time (even when my application is closed, and the device is sleeping). Have any features as Alarm and BroadcastReceiver as in Android OS? Please help me, thanks!
On which alarms do yo want to respond?
On iOS you can't wait for such events when your app is in background in general and you can't listen for them with titanium. With Titanium you can use LocalNotification (working like a timer). In their callback you should set a property and when the user opens your app you should check this property and open your window.
On Android you may create a background service but i have no idea how to listen on native events (except battery) on android.
Thanks for your reply.
I'm finding for a mechanism that has ability to wake up the device when it is sleeping and then open a window in my application. In Android, I know a mechanism called Alarm, I can register an Alarm with the Android OS, and after a specified moment of time (specified when I register Alarm), Android OS would be wake up the device (if it is sleeping) and send an Intend. And then, in my application I can register a BroadcastReceiver that listen for that Intent sent by Android OS. In that BroadcastReceiver, I can do something like start services, open new window (known as Activity in Android).

Background app crashing current app

I'm building an app that uses the camera. As many know, the camera uses a lot of memory and often throws a memory warning.
The app works well and as expected. However, when streaming Spotify in the background, my app crashes.
Is there any way to stop/pause a background app?
in iOS, every app runs in its own sandbox environment that cannot interact with other apps which are running so there is no way your app can pass on any kind of instruction (pause/stop) to other app running in background.