w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how can i play an audio file in background using "App registers for location updates" background mode
Have you explicitly set the Audio Session category? The Audio Session Programming Guide has a useful section "Choosing the Best Category" which describes the different options: Audio Session Programming Guide I'm not in front of a Mac right now, so I can't test this. But I suspect adding the following to your viewDidLoad method might help you out when you multitask away from your app. NSError *sessionError = nil; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&sessionError];

Categories : IOS

iOS background location updates
Varun welcome to SO community. Here is some lines from docs Any app that requests background location services should use those services to provide a tangible benefit to the user. For example, a turn-by-turn navigation app would be a likely candidate for background location services because of its need to track the user’s position and report when it is time to make the next turn. So if you are using standard location service and whenever you get updates and you are not doing anything with that update (in terms of user not coding) then there are very high chances that Apple may reject your app, which they already did. So what's the solution then? 1. Answer is try submitting the app with other approach. 2. Try submitting the app with other name :D Solution Number 1. Instead of using s

Categories : Iphone

Flask background web scraping and database updates
Ok, so my application contains code that automatically creates the database/tables if it's empty. It turns out that Apache/WSGI was running the Flask application from a different working directory than what I was running my background worker in. That caused the worker application to create its own database, so the two applications were actually working with separate databases. So the solution was to make sure they each ran from the same directory.

Categories : Python

how to get user's posts & updates from Google plus like facebook
From a backend server you can easily perform this API call to read a user's public activities. You can see the REST API here: https://developers.google.com/apis-explorer/#p/plus/v1/plus.activities.list Combine this with a people.list and you can query for a user's friend activities on Google+. On iOS, you probably don't want to make these API calls directly from a user's device. If you can, you should offload the work to a backend server to avoid overworking the mobile client. That said, you can perform an API query similar to listing people in circles: GTLQueryPlus *query = [GTLQueryPlus queryForActivitiesListWithUserId:@"me" collection:@"public"]; [[[GPPSignIn sharedInstance] plusService] executeQuery:query completionHandler:^(GTLServiceTicket

Categories : Iphone

Distribute Google Apps Script and push updates
The easiest way to distribute an specific (bounded) script is indeed to create a template spreadsheet with the script in it. The Gallery is suitable if your script is more generic and can be used by anyone. Now, there's no great solution to push changes to script's copies, doesn't matter how you distribute your script, because in the end each "installation" is an independent copy, not linked to the original. The easiest, but still cumbersome, way of doing this is to use a library. You place all your logic inside a library and only the boilerplate inside the scripts that will be copied. i.e. an onOpen and onEdit functions and stub menu functions. Something like this: function onOpen(e) { return Lib.onOpen(e); } function onEdit(e) { return Lib.onEdit(e); } function stub1() { return Lib.st

Categories : Google Apps Script

Is there a time delay between updates of Google Chrome cookies sqlite database
I think I have found the answer to my question here in Chromium developer section. According to it, SQLitePersistentCookieStore updates the database every thirty seconds (when it has something to update it about) or if the queue gets too large. As Google Chrome draws its source code from Chromium (open source), so it's safe to say that it applies to chrome too.

Categories : Java

Google location service updates ignoring location listener (android)
Typically right before I call and use GoogleMap I instantiate the supportfragmentmanager then use this to instantiate the map. Like below I hope this helps. lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); SupportMapFragment mf= (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); map = mf.getMap(); //map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); ll = new SecondPointLocationListener(); As far as your method for printing the location use this instead... @Override public void onConnected(Bundle arg0) { Toast.makeText(context, "GPS connected", Toast.LENGTH_SHORT).show(); connector = new Connector(); connector.execute("clues", null, null); listener = new LocationListener()

Categories : Android

Retrieving the state of Google Chrome preferences, like "Continue running background apps when Google Chrome is closed"?
You cannot read the state of Google Chrome preferences. Google does not provide an API for Chrome, "system" settings, and Google blocks general reads to the file system (You can read sandboxed files only). isAllowedIncognitoAccess()Doc just reports wether the extension is allowed in "Incognito mode", AKA "porn mode". It has nothing to do with whether background apps run. Currently, Chrome's high-level settings are stored in a JSON file named Local State in the User Data folder1. If you can find a way to read this file, the "Continue running background apps when Google Chrome is closed" setting is stored in the background_mode property. 1 The User Data folder defaults to: Windows XP: %AppData%..Local SettingsApplication DataGoogleChromeUser Data Windows Vista/7/8: %Loca

Categories : Google Chrome

Google location API: request location updates with pending intent?
You can either register Broardcast Reciever or Activity through pending intent.Sample Example for registering boardcast reciever: String proximitys = "ACTION"; IntentFilter filter = new IntentFilter(proximitys); registerReceiver(mybroadcast, filter); Intent intent = new Intent(proximitys); PendingIntent proximityIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); locationManager.requestLocationUpdates(provider, mintime, mindistance, proximityIntent); Your Broardcast Reciever: public class ProximityIntentReceiver extends BroadcastReceiver { @SuppressWarnings("deprecation") @Override public void onReceive(Context arg0, Intent intent) { //action to be performed }

Categories : Android

C# Progress Bar in background worker + Socket - Progress bar only updates after socket comm is done
The problem is because the progress bar is being updated by the UI thread. But the UI thread is "busy" waiting for the GetDeviceStats function to complete. So it cannot handle the progres bar update until it becomes free again. If the GetDeviceStats function is a long running process (which to me it is) then you would be best including that work within you background worker thread. However, you still wont be able to report the progress (and therefore update the progress bar) until the call has once again finished. Some possible solutions to that would be to either have GetDeviceStats report progress as it completes (I am not sure what that function actually does, so this may not be an option), OR if you need to "fake" the progress then use a second background thread or a timer. Person

Categories : C#

Can I use a Google static map as a background?
You can simply save the image by navigating to the URL of your static map and use it as a background like any other image. .map-div { background-image:url('static-map.png'); } The maximum resolution it can be is 640x640, which may or may not be sufficient, however you can use a scale value of 2 to get a 1280x1280 image.

Categories : CSS

How to make Google Map v2 working in background
Not so much time ago Google has announced new Locations API. It is strongly recommended to use this new API since it is much more accurate and more efficient in terms of battery usage. So I would start with replacing your Service code which tracks user's location with this API. Most likely you will get more accurate data since Android map v2 uses this API to get current location

Categories : Android

Google Chrome Extension - background script
The background script should be viewed as "running in the background of the Chrome browser". Your desired effect (running a script for every page) is actually a task for content scripts. To learn more, read https://developer.chrome.com/extensions/overview.html#arch.

Categories : Google Chrome

Google Charts Exporting as Image with Background
Without knowing how the canvg library does its thing, the only course of action I can suggest is that you redraw the chart with a black background, convert it to an image, and then redraw the chart with the transparent background. It's not a particularly elegant solution, but it should work.

Categories : PHP

Google Maps with Custom Background Image
Your first example is only an map image not Google maps, For customizing the Google maps you can check the Styling the Base Map and style maps.

Categories : Google Maps

Google Maps - Custom Background Image
I did it recently, or something not quite as ambitious as the link, following the docs. It's not a background image, but you can literally change the road type, etc with css/javascript https://developers.google.com/maps/documentation/javascript/styling. If you need to limit the zoom degrees of freedom, like in the map, then change the map controls, as they did. See https://developers.google.com/maps/documentation/javascript/controls. All the magic happens on the website you linked to at: http://brickellhouse.com/js/location.min.js and http://brickellhouse.com/css/map.css Hope this was helpful.

Categories : PHP

table background image not set in google chrome
Try this: <table style="width:128px;height:293px;background-position:center;background-image:url(images/human.png);border:0;" id="human-body"> Your might check your directories if your css is in another folder and your image is in another folder then you may change your URL and add "../" at the beginning. This might help you!

Categories : HTML

How does Google+ auto-backup my photos on iOS in the background?
From what I've observer, G+ app is using significant location change api to wake up app & update photo stream. See apple docs for technical info how to use this feature.

Categories : IOS

CSS background gradient not working in Google Chrome
Using a tool I made to generate CSS gradients, this is the CSS for a gradient from #222222 to #111111, with support for all browsers: background: #222222; background: -moz-linear-gradient(top, #222222 0%, #111111 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#222222), color-stop(100%,#111111)); background: -webkit-linear-gradient(top, #222222 0%,#111111 100%); background: -o-linear-gradient(top, #222222 0%,#111111 100%); background: -ms-linear-gradient(top, #222222 0%,#111111 100%); background: linear-gradient(to bottom, #222222 0%,#111111 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#222222', endColorstr='#111111',GradientType=0 ); Here is a working JSFiddle.

Categories : CSS

Google event tracking (background events)
If they're logged in, you can substitute the autogenerated client ID with your own user/account ID (make sure to anonymize it before sending it to Google). With the Measurement Protocol it's the cid parameter: ...v=1&tid=UA-XXXX-Y&cid=my-user-identifier&t=event... In the Universal Analytics JS code, it would be something like this: ga('create', 'UA-XXXX-Y', { 'clientId': 'my-user-identifier' }); Hope this helps :)

Categories : Google Analytics

css background image issue in google site
I don't think you can change the background in Google Sites like this. The HTML Box is sanitized, and this CSS will probably go away. Instead, use More -> Manage Site, then choose Themes, Colors & Fonts, and specify the background you wish to use.

Categories : Misc

google spreadsheet set row background color based on note
To get the entire row, assume it starts at 1, and use the Range.getLastColumn() method to find the right-extent of the row. (If your rows are staggered, this may highlight empty cells at either end - checking for that, though, will slow down the function further.) function onEdit() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = SpreadsheetApp.getActiveSheet(); var cell = ss.getActiveCell(); var range = sheet.getRange(cell.getRow(),1,1,sheet.getDataRange().getLastColumn()); var note = cell.getNote(); var user = Session.getUser(); note = user; cell.setNote(note); if(note = "user@email.com") { range.setBackgroundRGB(255, 0, 0); } }; You also asked about a "better way". Here's a variation with a few 'improvements'. It uses the trigger Event, rathe

Categories : Google Apps Script

1 pixel of background repeat during zoom in Google Chrome
Subtract 1px from everything, including the background x-position. .red-div{ background-color: red; height: 29px; width: 300px; } .child { width: 100%; height: 100%; background: url('') repeat-x; background-position:-1px 100%; } JSFiddle

Categories : Javascript

Resident Backend Google App Engine "/_ah/background" (Python)
Any URL that starts with "/_ah/" is a reserved AppEngine URL. These are used for internal AppEngine tasks, you really shouldn't need to worry about them. What does _ah mean in Google App Engine? https://developers.google.com/appengine/docs/python/config/appconfig?hl=it-IT#Reserved_URLs

Categories : Python

Using Google Play Services LocationClient in background service
Full source code for a background service available here: https://gist.github.com/blackcj/20efe2ac885c7297a676 Try adding the super call to your onStartCommand. /** * Keeps the service running even after the app is closed. * */ public int onStartCommand (Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); setUpLocationClientIfNeeded(); if(!mLocationClient.isConnected() || !mLocationClient.isConnecting()) { mLocationClient.connect(); } return START_STICKY; }

Categories : Android

Google chrome extension help : change the background-color of the clicked tag
Just get the tags and attach a click event listener for each one. You can use getElementsByTagName() var divs = document.getElementsByTagName("div"); for(var d in divs) { divs[d].addEventListener('click', clickss); } function clickss(e) { this.style.backgroudColor = "yellow"; }

Categories : Javascript

How does Google Script send an email when it detects changes in the background, like cron?
You can use Time Driven triggers to schedule function executions. You can also programmatically manage these triggers.

Categories : Javascript

How to change or disable the alternating background colors in Google Prettify
Succeeded in fixing this by using the background property at the /* Alternate shading for lines */ li.L1,li.L3,li.L5,li.L7,li.L9 { } and also using the !important keyword to overwrite the defaults. So this is how it looks like: /* Alternate shading for lines */ li.L1,li.L3,li.L5,li.L7,li.L9 { background: #color !important }

Categories : CSS

Change background color at onTouch event on InfoWindow Google Map Api v2
This is waiting in the feature requests queue on gmaps-api-issues, so not easily possible to make it work yourself. You can however try this nice hack: http://stackoverflow.com/a/15040761/2183804 It is used there to make clickable buttons on info window, but can also be used for your case.

Categories : Android

How to change row background color based on date of cell, google spreadsheets
You are most likely dealing with inconsistent data types in your comparisons. Let's just look at: if (date == '8/5/2013') The default behavior in Google Sheets would be to convert a cell value of '8/5/2013' to a date, in the spreadsheet. Therefore, when you getValue(), you will have a javascript date object instance for the left side of this comparison. What about the right side? It's a String, a primitive type in javascript. To compare these two types, one of them will be coerced so that we can compare them. Since the right is a primitive type, the left will be converted to match; a string. Let's see what that would be. var A = String(date); // Mon Aug 05 2013 00:00:00 GMT-0400 (EDT) So, now you have a string comparison, which returns false because: 'Mon Aug 05 2013 00:00:00 GM

Categories : Google Apps Script

Chrome App / Extension - Background Request Error, or Allowing app issue to load Google Doc API
I had been worrying by same state. But I just cleared this state with "setTimeout" , nevertheless the chrome ver is 29.x. The program code is here... filename:chrome_ex_oauth.js line:about 77 77> chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { //original_midify///////////////////////////////////////////////// setTimeout(function(){ 78> if (changeInfo.url && 79> changeInfo.url.substr(0, url_match.length) === url_match && 80> changeInfo.url != tabs[tabId] && 81> window.chromeExOAuthRequestingAccess == false) { 82> chrome.tabs.create({ 'url' : changeInfo.url }, function(tab) { 83> tabs[tab.id] = tab.url; 84> chrome.tabs.remove(tabId); 85> }); 86> }

Categories : Javascript

Can I use Google voice search to recognise voice in background?
There is no way to get the Google speech recognizer to operate on anything other than the mic with the provided APIs. As well, there is no official way to use the underlying web service either, though there is an unofficial way based on the chromium source code. If you want to do speech recognition offline, you can run PocketSphinx on the device. Or, you can try to find an online API that you can use for speech recognition, but most of the major ones are either unavailable for licensing or very expensive.

Categories : Android

Background process in android is killed after a phone call or after long time in the background
You can't... this is how the Android OS works. It can kill background processes at any time when memory is low. See Processes and Threads and Activities for more info.

Categories : Android

How to rotate programmatically the background image of a div that uses background-size:cover with Jquery?
Remove "cover" from this line of code: $('.fondo_intro').css({'background':'url("'+cargar_fondos[fondo_num++ %cargar_fondos.length].src+'") no-repeat 50% 100% cover'},'slow');

Categories : Jquery

Body background is having image 1374x1074 but on zooming --, white background is coming
These days, I would just add background-size to the CSS, as that's pretty well supported now: body { background: url("images/background.png") no-repeat scroll 0 0 #FFF; background-color: #E6E6E6; background-size: cover; }

Categories : HTML

Size of the background image not updating on background-attachment: fixed elements
If you are interested in the javascript version, you can try: $(document).ready(function(){ $('#smaller').click(function(){ var oldHeight = $('.fixed').height(); $('.fixed, .notfixed').css('height', oldHeight/1.25 +'px'); $('.fixed').css("background-size", "auto " + $('.fixed').height() + "px") }); }); When you click it resizes the background. Maybe you will need to add about 10px more to the height to perfectly match the box.

Categories : HTML

How to make AVAudioPlayer stop playing background music after 30 minutes even when in background?
You could take a look at these: http://developer.apple.com/library/ios/DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html#//apple_ref/doc/uid/TP40007072-CH4-SW3 How to run the timer in background of the application?

Categories : Iphone

Can we Relaunch the application in the background on location change? after force quit it from background
Right now your app's location behavior relies on your viewController being available. You've combined the "V" and "C" part of MVC. I would consider pulling the CLLocationManager out of your view controller and setting it as a property on your AppDelegate. That way you don't have to instantiate a view controller to react to location changes, and it establishes a pattern to access location elsewhere in your app. Configure your locationMananger first, then pass it into your viewController.

Categories : Iphone

background-attachment:fixed and background-size: cover makes images dissapear in Chrome
This is your current code in the jsfiddle: HTML: <section class="main_section" id="sec1" data-stellar-background-ratio="0.2"> <article class="section_details"> <h1>Start</h1> </article> </section> <section class="main_section" id="sec2" data-stellar-background-ratio="0.2"> <article class="section_details"> <h1>Überschrift</h1> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut ante eu massa consectetur consequat. Nullam interdum justo vitae mi tristique interdum. Mauris arcu metus, gravida sed malesuada in, euismod in libero. Nulla euismod ultrices pulvinar. In at gravida nulla. Suspendisse at neque ut neque convallis hendrerit. Maecenas mollis

Categories : Google Chrome

Positioning content relative to background with background-position:cover
body { background: #EEE url('../img/test.png') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } Referece : http://css-tricks.com/perfect-full-page-background-image/ Demo : http://css-tricks.com/examples/FullPageBackgroundImage/progressive.php

Categories : HTML



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.