w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Network Accessibility and Content Providers on android
Good questions, but too broad and open-ended. Also, I find it hard to understand You have an application that needs to be able to store user accounts onto a database. Where will the database be, on the web or on the device? Do you want to be able to access a web database from the device? Do you intend to store the user accounts on the device? If you have a web-based database, you have to provide a web server to get data from the database and offer it to your Android app. There are many ways to do this. A content provider is one of the four main building blocks of an Android app (the others being activity, service, and broadcast receiver). Content providers provide a standard interface between local data and other components, including components in other apps. A content provider can han

Categories : Android

Android sharing View Flipper content with other apps (twitter, gmail etc..)
I propose you to store the data you want to share as the tag of buttons. b.setTag("abc"); // Whatever you want to share This way you can get the data from the button in the event callback. @Override public boolean onTouch(View v, MotionEvent event) { switch (v.getId()) { case R.id.bShare: { Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, (String) v.getTag()); startActivity(Intent.createChooser(intent, "Udir/Share")); break; } } }

Categories : Android

Developing apps for Android using Html5, will restrict to access local disk, and other systems call?
Android doesn't natively support HTML5 apps. You're going to have a Java app that contains a WebView in which your HTML5 UI exists. You can communicate between the Javascript inside the webview and the Java app on the outside with a couple of hooks. It's hacky, but you can always communicate out to the Java app and have the Java app implement the functionality you need. Depending on how much work you're doing in HTML5 vs in Java, it may or may not be worth the hassle. Generally the Java UI will be much smoother.

Categories : Android

Azure - How to access content files of WorkerRole?
You could store your templates in Local Storage: http://convective.wordpress.com/2009/05/09/local-storage-on-windows-azure/

Categories : C#

Replace existing content = local storage + existing content. Javascript, WebStorage, LocalStorage
The original script did not provide the means to load the logs from localStorage, and stored new input under the "logs" key, while the intent was to prepend. The solution is quite simple: load from localStorage on page load, and overwrite localStorage['logs'] with the contents of logContents as displayed on the page. .... window.onload = function(){ existing_log = localStorage.getItem("logs"); console.log(existing_log); if (existing_log){document.getElementById("logContent").innerHTML = existing_log;} } function enterPressed() { if (textBox.value == "") { return; } else { var logText = today + ":" + " " + document.getElementById("textBox").value + '<br> '; $("#logContent").prepend(logText); // Prepend textBox's content to the top of

Categories : Javascript

Do apps on Android need to be connected to Google Play to access location data?
You need google Play to access Google Maps API. If you want to be accessible to all users, it's okay because you might be publishing it on Google Play and almost every users have Google Play adjusted.

Categories : Android

Android Studio - How to load HTML5 content from a local path using Webview?
Stick the html files in the assets folder, created (or found) in the root of the project Access them with loadUrl(): webView.loadUrl("file:///android_asset/index.htm"); where index.htm is the name of the file.

Categories : Android

Find machines on local network based on port (network discover) in android
I am assuming you know how to connect to a tcp server. If not, First go through http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/ You can try opening multiple threads with each thread waiting to connect to a specific ip/port ( along with some timeout value ).If the thread produces an exception, that means the connection was unsuccesful. Othewise add that ip address to your Open_Devices list.

Categories : Java

Replace content of a fragment and remove old content - Android aplication
I finally found a workaround, I solved the problem like this: TabFavorites tabFavorites = (TabFavorites) getSupportFragmentManager().findFragmentById(R.id.pager); tabFavorites.reloadFavChannels();

Categories : Java

java.lang.ClassCastException: com.google.android.gms.common.images.e cannot be cast to android.content.ComponentCallbacks
Looks like this is a bug in Google Play game services ImageManager. We were using ImageManager loadImage() to load images for unlocked achievements. Because the class causing the exception is in the ImageManager package (android.gms.common.images) we tried updating the app to stop using ImageManager (switched to using APK image files). The bug has stopped, so I guess that's the cause

Categories : Android

created a jquery tab content changer when tab content is increasing height due to inner content its over lapping to its bottom div
This happens because the wrapper of you content tabs .tab-container has height: 300px;. Put it to min-height: 300px; and should work fine. Test: JsFiddle

Categories : Jquery

Using Google Drive API with service account in Google Apps Engine python project with local debugging
Yes - you can use SignedJwtAssertionCredentials to connect to Google Services. I wrote code which do that at one time and it work great. Using that class is one problem. On GAE is provided PyCrypto library like you wrote but on local you must install it manually. GAE have his own changed version of this library so they didn't provide her source code. Second problem with that library is that she is compiled for specified machine which will use her. If you look in source code of that class you will see that she needs some dependencies to work. If they didn't meet the requirements of that class she will be not accessible from outside code. About problems with import in old and new dev_server i can't write anything because i don't know anything about that.

Categories : Google App Engine

How can I open local files with link to access local files with jsp
It's a bad idea to make static link to the files that laid on your disk from web pages,so jsp can't allow you to do it unless your folder or files is inside the web app's folder. Writing servlets or struts's action to process the download will make it. Now here is the example about servlet process.struts's action will be alike. protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String fileName = "filepath"; File file = new File(fileName); FileInputStream fis = new FileInputStream(file); byte[] buffer = new byte[fis.available()]; fis.read(buffer); fis.close(); resp.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName,"utf-8")); resp.addHeader("Content-Leng

Categories : Java

The type android.content.Context cannot be resolved. It is indirectly referenced from required .class files
Adding jar from Android SDK path...cleared the error. :) Josh Edit: Basically I copied the file android.jar from my computer and added it to the path of my Sap Mobile Platform project, which is running on a remote virtual machine. These are the detailed steps (We all love detailed steps): go to: YourAndroidSDKPathsdkplatformsandroid-17 (instead of 17 go to your version number) ...and copy the file android.jar somewhere else Now, go to your SMP project, highlight the red "app.getInstance().getApplicationContext()" code where the error is, so that a yellow popup appears, with a hyperlink to "Fix Path" Go to the Library tab, click on add external JAR, and browse to the android.jar file that you copied before. Voila!!

Categories : Java

Content delivery network
If I understand your question correctly, then the Azure CDN already does this (as does pretty much any CDN provider). You can configure the CDN to point to your website, and then when users access the CDN URL the CDN will fetch the content from your website and then cache it within the CDN storage. The next request from a user in that same CDN region will get the file directly from CDN without going to your website. See the "Caching content from hosted services" section in this article.

Categories : Image

Android API for Google+ Photos
I finally found all the pieces for that I need. The end result is to use AccountManager to get the auth token and PicasawebService to do the rest. Though there are some annoying bug with adapting the class. I wrote up my little adventure here along with example code. http://roostertech.wordpress.com/2013/08/09/accessing-gphoto-android/

Categories : Java

Access Virtual WAMP Server on Local Network
Try this: Edit: your httpd.conf file ( use the menus to get to the correct file ) Look for this # onlineoffline tag - don't remove Add a new line AFTER Allow from ...... Like this Allow from 172.16.0.241 Or if you want to be able to see the wampserver from the whole subnet Allow from 172.16.0

Categories : Windows

Connect to a Microsoft Access .mdb on a network from Xampp local
I have following for connecting to database file on local drive: $dbName = $_SERVER["DOCUMENT_ROOT"] . "IncludesfileName.mdb"; And those for connecting to database file on network drive: $dbName = "\\serverfolderapplicationfileName.mdb"; $dbName = "P:applicationfileName.mdb"; Followed by: new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd;"); All of them are working.

Categories : PHP

How to access local data in new apps from previously deleted app
You can save data in iCloud. Your applications can share iCloud data as long as they have the same bundle identifier prefix. Alternatively, you can sync this data with your own (web) server. It's up to you to write this functionality in your apps. There is currently no shared document space on iOS. Each application is contained within a sandbox and cannot access documents stored in another application. Documents can be shared through URL schemes, but this has to be launched from the originating app to the destination app (both apps must be installed at the same time).

Categories : IOS

How to avoid Chrome dragging content
Try adding the draggable="false" attribute to relevant elements. By default <img> and <a> elements can be dragged, as can selected text (not much you can do about that one). Alternatively, try adding ondragstart="return false;" to the document.

Categories : Javascript

How to use support FileProvider for sharing content to other apps?
Using FileProvider from support library you have to manually grant and revoke permissions(at runtime) for other apps to read specific Uri. Use Context.grantUriPermission and Context.revokeUriPermission methods. For example: //grant permision for app with package "packegeName", eg. before starting other app via intent context.grantUriPermission(packageName, uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION); //revoke permisions context.revokeUriPermission(uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION); As a last resort, if you can't provide package name you can grant the permission to all apps that can handle specific intent: //grant permisions for all apps that can handle given intent Intent intent = new Intent(

Categories : Android

Looking for custom PHP Content Delivery Network (CDN) script for my server
This isn't done in PHP, this done in Apache. What I've done on my own home server (that's probably what you want) is set up a cookieless sub-domain for serving content, and enable caching and GZip. The following Apache configurations are all located in a .htaccess file in the website directory. # GZIP compression SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch MSIE !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI .(eot|ico|gif|jpe?g|php|png|ttf|svg|woff)$ no-gzip dont-vary # Fonts on a cookieless subdomain <FilesMatch ".(eot|ttf|svg|woff)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> # Cookieless Static Content <FilesMatch ".(css|eot|ico|gif|jpe?g|js|png|ttf|svg|woff)$"> H

Categories : PHP

Sharing Data Between two Android Apps using Network Sockets
I don't think using sockets can solve your problem. Only one app can be active at a given time, and the connection won't work. Unless you create some sort of service, but this approach seems wrong. I believe you have 2 basic options in front of you: A server that both apps communicate with. Writing information to the disk in a globally readable place. The server option is better IMO.

Categories : Android

Can apps provide a hook for Spotlight to search content within the app?
According to the Core Data Spotlight Integration Programming Guide, the functionality you want is not available for iOS, only for Mac OS X.

Categories : Iphone

httpClient.PostAsync(url, content) not working in C# Metro apps
According to this MSDN forum thread, this can be caused by proxies that don't support the "100 continue" expectation. As a workaround, set ServicePointManager.Expect100Continue or HttpRequestHeaders.ExpectContinue to false.

Categories : C#

How to design content share model for social network in Django?
If I do this work, I may choose the first design; But I will create a category Model like this class Category(models.Models): category = models.CharField(max_length=100) class VideoPost(models.Models): category = models.ForeignKey(Category) ......

Categories : Django

How can I upload multiple photos in one post on Google+ from G+ Android SDK?
It should work with addStream() method, unfortunately... it doesn't work. Indeed it makes the application crash. After a long search, I finally got it: it's not possible if using the simplified G+ SDK! (the one dedicated to Android). There is a second one, included in the Google API family that you can find there: http://code.google.com/p/google-api-java-client/wiki/APIs#Google+_API This one will let you build more advanced post, included, several pic one. Unfortunately the second SDK is much more low level, not dedicated to Android, it's a kind of Java abstraction over http request. Regards

Categories : Android

Using a Network Socket to share Data bewteen two Apps on the Same Android device
Are you aware of the UNIX sockets? We can use UNIX sockets for communicating between apps in the same device. Android supports it. Helpful links: 1) http://beej.us/guide/bgipc/output/html/multipage/unixsock.html But I am not aware of how to create UNIX socket in java layer. If you are aware of the JNI then you can create the UNIX socket in C and pass on the data between the Java<->Native layers. Android supports local sockets: https://developer.android.com/reference/android/net/LocalSocket.html

Categories : Android

How can I use iCloud to synchronize a UIdocument files (saved in local document directory) between my apps?
Apple provides extensive documentation on this topic, and it's all built in to Xcode. A good starting point is Managing the Life Cycle of a Document. The basic steps are: Create the document locally Use NSFileManager to move the document to iCloud Use NSMetadataQuery to find existing iCloud documents. Use NSFileManager again to download documents from iCloud. There are also numerous WWDC sessions on the topic over the past 2-3 years, available to anyone with a current Apple developer account.

Categories : IOS

Monitor the IP addresses from connections being made from all apps using the network without rooting the Android phone
For all those who are curious about this same issue, I was able to finally figure out how to accomplish this task, without rooting the phone or using a VPN service. The key to solving this issue, is to look in the following directory on the phone: /proc/net/(tcp, tcp6, udp, udp6, etc) Also, here is some code from an open source project that does basically what I was looking for. /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distrib

Categories : Android

Need Apps Script to Copy a File(s) from my Local Hard Drive to a Google Sites Folder
You have to write an UI to that allows the visitor to the site to upload the file. See https://developers.google.com/apps-script/reference/ui/file-upload for an example.

Categories : Google Apps Script

Google Analytics Event tracking: how to avoid sending data for local test?
Add the following snippet to your dev environment: window['ga-disable-UA-XXXXXX-Y'] = true; For more information read https://developers.google.com/analytics/devguides/collection/gajs/#disable

Categories : Google Analytics

how to load csv file content to mysql database and avoid duplicate entry?
LOAD DATA INFILE 'somefile' IGNORE From the manual: If you specify IGNORE, input rows that duplicate an existing row on a unique key value are skipped.

Categories : PHP

access Google Music from other apps
This is as close as you are gonna get o an API, this is using Python but you are welcome to go through the code and write your a fork using Java/Android. https://github.com/simon-weber/Unofficial-Google-Music-API

Categories : Android

Where/how can I whitelist access to my Google Apps API?
Nevermind. The help page is at least almost a year out of date. I think the solution is to edit the Allowed Referers list on the API Access pane. Source: https://groups.google.com/d/msg/google-ajax-search-api/-/txNfHpKxFiMJ

Categories : Misc

How to avoid/skip the text finding inside the Hidden/Non-displayed content in CKEDITOR 4.0
At the moment CKEditor doesn't offer such feature. You need to modify the source code of the find plugin to have this working your way. Created a new ticket for this bug on CKEditor bug tracker. Hopefully we'll see this fixed soon ;)

Categories : Javascript

How to allow others to access a web app made from a Google Apps Script?
The link you show here is the development link , the one that is described as "the last saved version of your code", this link is not shareable ... the one you should give to people is this one : https://script.google.com/macros/s/AKfycbz1SKJi5HW1r2ZHiYpjedjul-IE4vcB266kdDzDrVCE/exec it is shown in this popup window beside that, the sharing properties of the script file is not relevant, you could keep it private.... only the settings in this window are important to determine who has access to your app and how (meaning run as you or as user accessing the app). You should also keep in mind that users will see the version you have chosen in this same popup window, no matter the changes you could have saved and are using in your .dev version... so think about publishing the right version

Categories : Google Apps Script

getting the content of script file using a local javascript
You can not achieve this one locally. Loading the script will execute it and won't give you access to the src so then the only option you would have is to load the file as an ajax call. But ajax calls don't work locally (due to security) .

Categories : Javascript

Serve content from a local web server, via Phonegap
Found a solution using HTML5 Offline Cache: https://developer.apple.com/library/safari/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html#//apple_ref/doc/uid/TP40007256-CH7-SW1 I can upload to a remote server, setup my manifest file, cache once, then go out on the road and still access the application.

Categories : Javascript

Trouble with serving local content while using RewriteRule [P]
This is the way Apache has worked since version 2.0: It gets a request, runs that request through all of the RewriteRules, then if the resulting request is a directory, it tries to see if the first DirectoryIndex will work, so it runs that through the RewriteRules and tries to serve the result. If the first DirectoryIndex entry doesn't work (i.e. it gets to the point where Apache would have served a 404), the server tries again with the next entry and so on. Your problem, obviously, is that the proxy rules latch on to the nonexistent first DirectoryIndex value and try to send it through the reverse proxy. I haven't found a general way to fix this behavior server-wide, but there is a workaround. Use either a <Location> section in your httpd.conf file or a .htaccess file and overri

Categories : Apache



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