w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
No internet access on Android Emulator, Shared Internet Connection
Finally I sorted out my problem. It was problem due to dns server address. I did below steps open CMD Goto your android-sdk/tools path, Like my path is G:Andriod Developmentandroid-sdk ools type this command G:Andriod Developmentandroid-sdk ools>emulator.exe -avd Android_2.3.3 -dns-server 8.8.8.8 -scale 0.75 here Android_2.3.3 is your AVD name, -dns-server 8.8.8.8 will set your DNS address to 8.8.8.8 or 8.8.8.8:55 and -scale will scale your AVD to specified value. this will start a new emulator. Enjoy :) Hope may be helpful to others

Categories : Android

Can android differentiate between a lost internet connection and no internet connect?
You need to use a BroadcastReceiver that will be triggered when the connectivity status for Wi-Fi has changed. Set following things before registering BroadcastReceiver: private class ConnectionChangeReceiver extends BroadcastReceiver { public void onReceive( Context context, Intent intent ) { Log.d(tag, "Inside Broadcast Reciever"); CheckWifiStatus(); } } private void RegisterWifiWatcher() { if(wifiWatcher == null) wifiWatcher = new ConnectionChangeReceiver(); final IntentFilter intentFilter= new IntentFilter(); intentFilter.addAction("android.net.wifi.WIFI_STATE_CHANGED"); intentFilter.addAction("android.net.wifi.STATE_CHANGE"); registerReceiver(wifiWatcher, intentFilter); } WIFI_STATE_CHANGED : Broadcast intent action indicating that Wi-Fi has been enabled,

Categories : Android

After getting asp.net project from VS team server: references don't work?
It sounds like someone added a reference to a path which doesn't exist on your system.If you right-click one of the missing references and choose Properties from the popup menu you will be able to see the path that has been set for the reference and verify if that is the case. If your team is not already doing it, I would recommend copying third-party DLLs to a central folder under source control e.g. /lib and add all references from there to ensure that there are no path discrepancies in future.

Categories : Visual Studio 2010

Library projects in Android Studio only work if nested in the project tree?
Every step are here : How do I add a library project to the Android Studio? If you want to more about gradle see the Google I/O conference by Xavier Ducrohet on youtube : http://www.youtube.com/watch?v=LCJAgPkpmR0

Categories : Android

How to work when internet connection down?
HTML5 has some offline capabilities. http://www.html5rocks.com/en/features/offline But do you really have a business case for this? It will get complicated when you need to try and update stale data etc.

Categories : Asp Net

code coverage tool from Visual Studio 2012 Team Tools does not work on release bits
Try this: Enabling Profiling. [UPDATE 5 Jun 2013 14:04:00-04:00 UTC] I also found this article that you may be interested in: Application Analytics: What Every Developer Should Know. As far as Code Coverage is concerned, I didn't see anything specific to using the VS Code Coverage tool and configuring for IIS. I did see lots of articles about testing web applications in general, some of which involved setting up code coverage (Setting Up Machines and Collecting Diagnostic Information Using Test Settings being an example). Sorry I couldn't be of more help to you.

Categories : Iis

An error occurred running job Full Analysis Database Sync for team project collection or Team Foundation server
I think the core error is A connection could not be made to the data source with the DataSourceID of 'Tfs_AnalysisDataSource' Check the data source settings, especially the connection string. Typical reasons are connection protocol settings wrong so that the protocol configured for Analysis Services is not configured for the relational engine, firewall or authentication issues.

Categories : Tfs

check internet connection doesn't work correctly
use this code public boolean CheckInternet() { ConnectivityManager connec = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); android.net.NetworkInfo wifi = connec.getNetworkInfo(ConnectivityManager.TYPE_WIFI); android.net.NetworkInfo mobile = connec.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); // Here if condition check for wifi and mobile network is available or not. // If anyone of them is available or connected then it will return true, otherwise false; if (wifi.isConnected()) { return true; } else if (mobile.isConnected()) { return true; } return false; } Permission: <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Categories : Android

How to enable certain Internet connection in Android app?
I'm not sure you can do this programatically within the app but you can present the user with a button to open wireless settings so they can enable/disable one or the other. That's covered here: Ask user to start WiFi or 3G on launching an android app if not connected to Internet Also, it is possible to restrict apps from using mobile data and force them to use only WiFi in the Android settings menu. Go to Settings -> Data Usage -> Select the app -> Restrict Background Data. This will only allow the app to use WiFi data and the restriction is at the OS level. I hope these help!

Categories : Android

TFS Team Project Collection vs Team Project
Everything you should consider is covered in the ALM Rangers' Planning Guide. I suggest you have a read of this, as there it a little too much to summarise here. If you have a specific question about any of this, feel free to post a new question.

Categories : Tfs

Checking for internet connection constantly with android
See this answer: How to check internet access on Android? InetAddress never timeouts However I would like to point out something that you may have overlooked: checking for constant internet connectivity will consume power. A lot of power. So, what you may end up doing is draining your user's batteries (which would have a lot of negative consequences, not just poor reviews). So, maybe we could talk about why you need to check for internet connectivity constantly? You might want to look into how you can buffer up your network requests or caching ,etc. Feel free to edit this question or even create a new one, just link to it :)

Categories : Android

Why Android can handle only one active Internet connection?
Can someone explain me this strange behavior. Android uses WiFi if it is available. Otherwise, it uses mobile data. It seems Android can handle only one connection in spite of there several ones active. Android normally only uses one connection at a time. In most of the world, mobile data is metered, and so if WiFi is available, Android uses it, to reduce the cost to the user. The OS is capable of using multiple connections at once (see the WiFi hot-spot facility), but for normal operations, only one connection is necessary.

Categories : Android

Check for Active internet connection Android
I use this: public static void isNetworkAvailable(Context context){ HttpGet httpGet = new HttpGet("http://www.google.com"); HttpParams httpParameters = new BasicHttpParams(); // Set the timeout in milliseconds until a connection is established. // The default value is zero, that means the timeout is not used. int timeoutConnection = 3000; HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection); // Set the default socket timeout (SO_TIMEOUT) // in milliseconds which is the timeout for waiting for data. int timeoutSocket = 5000; HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket); DefaultHttpClient httpClient = new DefaultHttpClient(httpParameters); try{ Log.d(TAG, "Checking network connection...");

Categories : Java

Google Maps v2 android crash when internet connection not available
You can use this method to check if there is an internet connection on the device: public boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager .getActiveNetworkInfo(); return activeNetworkInfo != null; }

Categories : Android

android - how to prevent webview to load when no internet connection
You'll want to override the shouldOverrideUrlLoading method of a WebViewClient to catch URL clicks. To check the Wifi status, you'll want to use the ConnectivityManager Try this: WebView mWebView; NetworkInfo networkInfoWifi = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE).getNetworkInfo(ConnectivityManager.TYPE_WIFI); mWebView.setWebViewClient(mWebClient); WebViewClient mWebClient = new WebViewClient(){ @Override public boolean shouldOverrideUrlLoading(WebView view, String url){ return true; } @Override public void onLoadResource(WebView view, String url){ if (networkInfoWifi.isConnected()) { //Take action } } } I'd recommend breaking your problem into two smaller steps - Click Interception and Connect

Categories : Android

how to check internet connection in Google nexus 7 (android 4.2)
For me it work: public static boolean isInternetEnabled() { ConnectivityManager conMgr = (ConnectivityManager) YourApp.context .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo = conMgr.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) return true; else return false; }

Categories : Android

Internet check connection not working android.net.isConected()
try this public static boolean isInternetConnection(Context mContext) { final ConnectivityManager connMgr = (ConnectivityManager) mContext .getSystemService(Context.CONNECTIVITY_SERVICE); final android.net.NetworkInfo wifi = connMgr .getNetworkInfo(ConnectivityManager.TYPE_WIFI); final android.net.NetworkInfo mobile = connMgr .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (wifi.isAvailable() && wifi.getState() == NetworkInfo.State.CONNECTED) { return true; } else if (mobile.isAvailable() && mobile.getState() == NetworkInfo.State.CONNECTED) { return true; } else { return false; } } public static boolean isWifi(Context mContext) { final Connectivi

Categories : Android

Android application force Close on lowsy Internet connection
add a null check on variable execute, in between these two lines HttpResponse execute = client.execute(httpGet); if(execute == null){ return null;} // null check to see if execute is null content = execute.getEntity().getContent(); another thing in onPostExecute, first line should check if InputStream result is null! @Override protected void onPostExecute(InputStream result) { if(result == null){ Log.d("TEMP_LOG",Content is null); return; } //do xml reader on inputstream } check and post your findings

Categories : Android

Failed to import Gradle project error creating new project with Android Studio
I had same issue with the latest Android Studio () today, and I finally found that configuring a https proxy for Gradle can solve the issue. I only set a http proxy at the beginning. Gradle needs to sync some files via HTTPS. Use IP address instead if hostname of proxy can't work.

Categories : Android

Add an Android Studio / IntelliJ project to a code.google.com project with git
OK, so the best solution I've come up with is to create a local git repository, create a code.google.com git project, and then manually connect the local repository to the code.google.com project. Note that this requires git to be installed on your development machine. Create the app project in Android Studio. Select the root project folder. Select VCS > Import into Version Control > Create Git Repository Select project folder to create a git repository. Now the project is under source control. Create a project at code.google.com using git source control. Go to the Source > Checkout page of the project and get the clone URL. Open a terminal and navigate to the project directory. Modify the local git repository to connect the remote repository on code.google.com: git remote add origin ht

Categories : Android

Android - Programmatically check internet connection and display dialog if notConnected
doInBackground runs on a different Thread than the main UI, so you can't create a show a dialog here. Instead, override onPreExecute in your AsyncTask, and do the test there.

Categories : Android

Android Studio: Importing project into existing project
Try going to File -> "Import Module" instead of "Import Project". In Android Studio, an entire window is a project. Each top-level item in that project is called a module. Coming from the Eclipse world, it'd be: Eclipse workspace = Android Studio project Eclipse project = Android Studio module

Categories : Android

Send Push notifications to iOS/Android on closed WiFi nework (no internet connection)
E.g. an on premises push notification service that can be used to send a notification to a users phone based on an event that is triggered by our server? With respect to Android, the answer is "not really". Your options are: Implement your "push" mechanism in the form of some message queue, where the devices poll looking for messages every so often, or Use a WakeLock and WifiLock to keep the device (and WiFi) powered on constantly, then use something like MQTT for the push message Either of these will be bad for the battery, though the first one is more configurable in terms of power drain (e.g., if you only check for messages once per hour, it won't be bad). The reason why GCM can keep the power drain low is because of special hooks for mobile data connections within the OS and

Categories : Android

How can I send http messages from android app( physical device) to my local server without using internet connection?
Assuming that your devices are on the same Network (connected to the same router) as your computer, you can expose your computer's web server (Apache, presumably?) and then point your app directly at the local network IP address that your computer has (usually something like 192.168.1.x). I have found that the least painless way to do this is to use MAMP or WAMP or LAMP depending on your OS, but of course I have no idea what your specific situation is, so that solution may in fact make things a lot more complicated rather than less. In any event... your computer is on the network at a specific IP address, so it's just a matter of making sure that it's willing to serve this data on whatever port you are looking for it on. If you provide more specification as to your circumstances, we can

Categories : Android

Nuget vs referencing another project in another team project in TFS
I think ultimately this is a personal choice, but I can tell you what my choice would be. I prefer the NuGet route. I have a private NuGet repository (or you can use MyGet) and publish any common libraries I may want to use between projects to that. I can then pull these down in different projects that require the library. Some advantages to this technique over referencing the project directly are: Fine control over the versioning of the library Ability to introduce major/breaking changes to the library without breaking every project that depends on it (again achieved through versioning) Easily share the libraries with other projects that are not in the same source control system. Quickly make the library public if that is a goal. Some disadvantages Setup of NuGet repository and

Categories : Visual Studio

Automatically versioning Android project from git describe with Android Studio/Gradle
After some further reading and several false starts, I ended up with this, added to the bottom of build.gradle in the project directory (that is, MyAppProject/MyApp/build.gradle, not MyAppProject/build.gradle -- confusing, I know, but the former directory is projectDir in Gradle so that's how I refer to it here). It depends on no external utilities other than Git, which is assumed to be in the path, so it should work on any OS (even though I used forward slashes in the paths, they get converted to backslashes on Windows). It could probably stand to be improved, I'm sure, as my understanding of Gradle is pretty rudimentary and my Groovy may not be very idiomatic (though that in particular is less of a concern). I have a feeling that my approach is suboptimal because it involves generatin

Categories : Android

Android Studio & Gradle: Add outside java classes to Android main project
you might want to make your Dir a own module add include 'Dir' to your settings.gradle create a build.gradle inside your Dir directory with this content apply plugin: java now you can go into your main projects build.gradle and add to dependencies: compile project(':Dir') if your Dir uses android related stuff, you might want to use the New > Module(right click on your project in Android Studio) Function of Android Studio to create an Android Library. But i haven't tested that feature yet. If Android Studio throws an Exception when trying to use the New Module, you should try to update Android Studio, in the latest Version it works for me. You might also want to check the Gradle User Guide and the DSL Reference both are very helpfull in getting into Gradle and understanding i

Categories : Java

How to setup and test an Android Library Project with Gradle and Android-Studio?
i think this tutorial will help you : http://cyrilmottier.com/2013/06/27/a-productive-android-development-environment/ !

Categories : Java

Android: How can I open an older android project in Android Studio?
Look at this links. How do I open my existing Eclipse projects in Android Studio? http://developer.android.com/sdk/installing/migrate.html

Categories : Android

How do I migrate my Android Eclipse project to using Gradle and Android Studio?
You should create a folder in you project's root and name it libs. Then copy your jar file to that folder and add dependencies { compile fileTree(dir: 'libs', include: '*.jar') } to your build.gradle file. If above won't work. You may need to try this post

Categories : Java

How to create the best Android app project structure with Android Studio and Gradle?
You should look at the multiproject example for the layout attached in the doc. http://tools.android.com/tech-docs/new-build-system http://docs.google.com/viewer?a=v&pid=sites&srcid=YW5kcm9pZC5jb218dG9vbHN8Z3g6NDYzNTVjMjNmM2YwMjhhNA Essentially you want a top level settings.gradle that tie all the pieces together. Ideally they should be in one single git repo to make your life easier. However you probably can use symlink to tie them into a common build repo that contain your top level settings.gradle.

Categories : Android

Import an Android Project from Eclipse to Android Studio and I have this error message "failed to find Build Tools revision 8.0.0"
Your build.gradle is trying to use Android SDK tools 8 which isn't installed on your machine. If you look at your build.gradle file you probably have this line buildToolsVersion "8". You want your build.gradle file to point to the Android SDK tools that you currently have installed (preferably the latest). Just open the Android SDK manager and see which tools you have installed and change the buildToolsVersion "8" to the right version.

Categories : Android

Android Studio: how to import Android library project
Go back to Project Structure window where you added the new module. Click on your main module, go to Dependencies tab, click the plus icon and select Module Dependency.

Categories : Android

Android copy existing project with new name in Android Studio
The steps in the link you specified should also work for Android Studio. Just make a copy (using a file manager) of the entire module folder and give it a new name. Now open it up and use Refactor -> Rename (right click on the item you want to rename) to rename your module and package. See this for details about refactoring in IntelliJ/Android Studio.

Categories : Android

How to check host connection with internet connection
use this method : public static boolean isInternetConnected(Context context) { final ConnectivityManager conMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); final NetworkInfo activeNetwork = conMgr.getActiveNetworkInfo(); final Dialog dialog = new AlertDialog.Builder(context).setIcon(R.drawable.ic_launcher).setTitle("Connection Error!!") .setMessage("Internet Connection not found. Check your settings.").setNegativeButton("ok", null).create(); if (activeNetwork != null && activeNetwork.isConnected()) return true; else dialog.show(); return false; } If you don't want to show the toast comment it. Don't forget to place permission in manifest file. Here is the permission : <uses-permission a

Categories : Android

Remove Project from Android Studio
File > Close Project move your mouse cursor on the project and press Delete keyboard button :) EDIT try this solution, works for me

Categories : Android

How do I export an Android Studio project?
In the Android Studio go to File then Close Project. Then take the folder (in the workspace folder) of the project and copy it to a flash memory or whatever. Then when you get comfortable at home, copy this folder in the workspace folder you've already created, open the Android Studio and go to File then Open and import this project into your workspace. The problem you have with this is that you're searching for the wrong term here, because in Android, exporting a project means compiling it to .apk file (not exporting the project). Import/Export is used for the .apk management, what you need is Open/Close project, the other thing is just copy/paste.

Categories : Android

Change project name on Android Studio
Right-click on your root project directory Select Refactor -> Rename Select rename project and change the name there. Also Select rename module and change it there as well. If you get an message saying module name already changed thats fine. Now right-click on the project root folder again and select Open Module Settings. Under the Modules section remove whatever folders are associated to your old project name. Apply Settings and hit OK. Restart Android Studio. Hope that helps!

Categories : Android

Android Studio need to rebuild project before each run
It's a known issue. Maybe you should try this: Same issue here, to avoid rebuild EACH TIME, i'm going to my module project settings -> Dependencies and up or down one of my library item -> Apply -> Ok -> Make regenerating R.java. You could also try unchecking "Use external build" in compiler settings: File -> Settings (Ctrl+Alt+S) -> Compiler -> Uncheck "Use external build"

Categories : Android

Collaborating on Android Studio Project using git
You would need to check if: you can configure Android Studio to use relative paths in the .iml (as shown in this old issue, using file://$PROJECT_DIR$/..., or this issue using content url="file://$MODULE_DIR$/...) or you would need to register a content filter driver (in a .gitattributes file) able to replace, on checkout, any absolute path by $MODULE_DIR$. If that 'smudge' script doesn't detect any, your module.iml will be unchanged. If it does detect absolute path, that script can introduce the proper modifications, and you will add and commit those, for others to reuse your project in a more portable way.

Categories : GIT



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