Why does $.getJSON silently fail?

you can use function name() { $.getJSON(“”, function(d) { alert(“success”); }).done(function(d) { alert(“done”); }).fail(function(d) { alert(“error”); }).always(function(d) { alert(“complete”); }); } If you want to see the cause of the error, use the full version function name() { $.getJSON(“”, function(d) { alert(“success”); }).fail( function(d, textStatus, error) { console.error(“getJSON failed, status: ” + textStatus + “, … Read more

How do I start playing audio when in silent mode & locked in iOS 6?

You need to make couple of changes in plist file. i.e. 1) Set Required background mode to App plays audio 2) set Application does not run in background to YES. NSError *setCategoryErr = nil; NSError *activationErr = nil; [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error:&setCategoryErr]; [[AVAudioSession sharedInstance] setActive:YES error:&activationErr]; Then, you need to write these much code … Read more

Install apps silently, with granted INSTALL_PACKAGES permission

Your first bet is to look into Android’s native PackageInstaller. I would recommend modifying that app the way you like, or just extract required functionality. Specifically, if you look into PackageInstallerActivity and its method onClickListener: public void onClick(View v) { if(v == mOk) { // Start subactivity to actually install the application Intent newIntent = … Read more

tech