w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Drawing power from USB device to android tablet through OTG cable
Your device will not be able to draw power while connected as the Host. You should look into the Android Open Accessory(AOA) Protocol, though you need the proper hardware to connect to. AOA allows the tablet to be connected as a USB accessory which will allow it to draw power and charge, but it also lets the Android device behave as if it were a host sending the commands to the connected hardware.

Categories : Android

Communicate Android Device to Localhost (My Windows 8 PC) over / via USB Cable
Well, I developed one application which connect my jsp file.here the sample code. try { URL url = new URL("http:/xx.xxx.xxx.x:80/sample.jsp"); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); InputStream in = new BufferedInputStream(urlConnection.getInputStream()); BufferedReader r = new BufferedReader(new InputStreamReader(in)); String x = ""; String total = ""; int i=0; ArrayList<String> content = new ArrayList(); while((x = r.readLine()) != null) { content.add(x);

Categories : Java

How can I send a signal to LEDs from my Android 4.2.2 device? (Eclipse & USB cable)
Are you on about controlling your LED by perhaps holding Data+ USB pin high or something like this? http://android.serverbox.ch/?p=549

Categories : Android

Using file_put_contents on android with php server writes a file, but a Windows user using a USB cable to the device cant see it
Maybe you can create a file with windows, check the owner of the windows file and then create a file with "file_put_contents" and check their owner. Then you can change the owner of the file to the windows user, if the web user is the root. Or try to use 0777 as chmod ;) Give it a try ...

Categories : PHP

How can i check if android device supports a library?
This is a similar problem to loading JDBC drivers. If the drivers don't exist you don't want to crash out your entire app. The basic principle of the solution is to use Class.forName() This lets you check if the class exists and throws an exception if it doesn't. Edit: To be clear - the reason why this works and why this is necessary is that if Java is unable to execute code because it doesn't have a class then Java will treat this as a catastrophic failure (an Error - specificity a NoClassDefFoundError). Therefore executing any direct reference to a missing class will throw this Error. According to the documentation: When errors are thrown, they should not be caught by application code. However when Class.forName() is unable to find a class (or more direct calls to a ClassLoa

Categories : Java

Identify that Android device supports EAP-SIM for WiFi authentication programatically
To implement EAP-SIM feature, it requires patched wpa_supplicant and API to access APDU channel. Since the AOSP did not have EAP-SIM support, there are different implementations on the market. It's hard to identify from wpa_supplicant, but we can check the APIs or service to guess if the device has smart card support or not. Check com.android.internal.telephony.RILConstants or com.android.internal.telephony.CommandsInterface. Git at Google Check if there is android.uid.smartcard system service. (Sony)

Categories : Java

Use jQuery to detect whether a device can make telephone calls (supports "tel://" protocol)
I'm not sure about Android or BlackBerry, but iOS will automatically pick up telephone numbers and wrap them like so: <a href="tel:xxx">xxx</a>...so you could have a hidden <div> somewhere that contains a phone number like 1-800-555-5555, then, on page load do something like this: var isTelephone = $("a[href*='tel:']").length > 0; This may or may not be portable to other platforms, you'll have to try it out.

Categories : Javascript

Is there a way to prevent or detect duplicated android device?
There are several more or less unique IDs that can be used to identify Android device. See this example - you may need to use all of them. On a rooted device with custom build an attacker can obviously fake any ID.

Categories : Android

How to detect rooted/jailbroken android device
There are many methods used to jailbreak a phone; most are hardware dependent and/or software dependent. Some phones are even shipped with superuser access by default! It does not make sense to check for all of these ways, because the end result is the same: you have superuser access. So yes, the simplest/easiest/best answer is to attempt to execute a superuser command. If you are concerned that this is not enough, perhaps you can explain more about what it is you are trying to do.

Categories : Android

RESOLVED : Eclipse doesn't detect my Android device
I have same issue with my Galaxy S3 (GT-I9300). I solved this issue after "Factory Data Reset". Now when i connect my phone with USB ,Eclipse shows my device perfectly. Hopes it's helpful!...

Categories : Android

How do i detect when android device screen is about to timeout or "Lock"?
You will need to register a broadcast reciever.Your system will send a brodcast when device is going to sleep. Put the following code wherever desired: private BroadcastReceiver receiver = new BroadcastReceiver() { public void onReceive(final Context context, final Intent intent) { //check if the broadcast is our desired one if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) //here define your method to be executed when screen is going to sleep }}; you will need to register your receiver: IntentFilter regFilter = new IntentFilter(); // get device sleep evernt regFilter .addAction(Intent.ACTION_SCREEN_OFF); registerReceiver(receiver, regFilter ); ACTION_SCREEN_OFF is sent after the screen turns off and ACTION_SCREEN_ON is sent after the screen turns on. UPDATE: 1.Meth

Categories : Android

How to detect a mobile device manufacturer and model programmatically in Android?
You can get as below: String deviceName = android.os.Build.MODEL; String deviceMan = android.os.Build.MANUFACTURER; For more other device details, Please refer this document: android.os.Build

Categories : Android

How to detect if the HDMI port on an Android device has HDCP enabled?
You can try to check the Display flags: http://developer.android.com/reference/android/view/Display.html#getFlags() FLAG_SECURE or FLAG_SUPPORTS_PROTECTED_BUFFERS (http://developer.android.com/reference/android/view/Display.html#FLAG_SECURE and http://developer.android.com/reference/android/view/Display.html#FLAG_SUPPORTS_PROTECTED_BUFFERS)

Categories : Android

Speaker output to mic input without cable on Android?
Getting Jack on Linux to connect the mic to the speakers: Start Jack with QJackCtl. This is not as easy as it sounds: Start QJackCtl. Click the "Setup..." button. Choose "alsa" from the "Driver:" dropdown. Choose your soundcard/soundcards that you want to work with from the "Input Device" and "Output Device" dropdowns. Note that if you have a relatively capable soundcard, there may be a number of possible devices for it (my Audigy 2 ZS has four). Choosing the correct one is beyond the scope of this tutorial. Check the latency in the bottom-right corner. Realize that Jack itself will take some time to process the sound. This gives you information about that (and I'm sorry, but I don't know precisely what it means). Running Jack is often a tradeoff between getting a super low latency and

Categories : Android

does the target SDK option in android SDK have to be the same as the test device Android version? (Android SDK basic)
You should set the minimum SDK required to whatever API is required for all code to work correctly. Some API methods are not available until later versions and some have been deprecated in current versions (though the deprecated methods should still work as expected). No devices that I know of require API 1-3. Most devices all have 8 or higher. The target SDK is the code you are targeting when you program so say if new APIs have become available and you are using them in your code then you won't get a compile time error saying the method/class doesn't exist. You should also be aware that if you target a higher API then will be running on the device, you may have run time errors of methods/classes not existing.

Categories : Android

testing ipad app on device using firewire cable rather than USB
Have you seen this? I don't think it will work. https://discussions.apple.com/thread/2537899?start=15&tstart=0 Specifically these lines: 3rd post down by: Michael Fryd Current iDevices no longer have the circuitry to charge or communicate off the FW pins. When you plug your iDevice into a FW style charger you will not hurt your iDevice. The higher FW voltage is on connector pins that are not connected inside your iPad.

Categories : Xcode

Android: How to detect if a device is WiFi or WiFi+Cellular
Here is excerpt from my code (it works so far): ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); NetworkInfo mEthernet = connManager.getNetworkInfo(ConnectivityManager.TYPE_ETHERNET); NetworkInfo m3G = connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); if (mWifi!=null) isOnWifi = mWifi.isConnected(); if (mEthernet!=null) isOnEthernet = mEthernet.isConnected(); if (m3G!=null) is3G = m3G.isConnected();

Categories : Android

android device does not show up under Android Device Chooser
Make sure you are using the correct android API and SDK version compatible with your device's version in the code. (In the android SDK for eclipse this is in Android Manifest.xml) If the two don't match up, then they won't show up when you try to test it on the device.

Categories : Android

SignalA supports all the versions of android application?
I'vent noticed this and I have minSDKversion set to 8 in my samples. I'll have to update this to 9. So the minimum version ought to be 9 then. :) Remember to include both signala and signala.longpolling libraries in your project. At this moment is only longpolling supported.

Categories : Android

android application directly login using saved account credential in android device
This is an in-depth look into how you can authenticate based on the users Android credentials, has an example of how things work and how the UI should be try this use some refrence api also available link You can get help from android developer blog link

Categories : Android

Android JUnit testing while executing OpenCV functionality on PC instead of android device
To separate this two tasks, you need to realize (for example) REST client on android and server on the desktop. Client should connect to server Server pings client and client sends him screenshots. Perhaps, you will need to create separate thread in test. Client should do the following: When you need to take screenshot: Object res = null; res = new File(takeScreenShot(solo)); Then public static String takeScreenShot(Solo _solo) { solo = _solo; String dir = "/sdcard/Robotium-Screenshots/"; String fileName = "screenshot"; java.io.File file = new java.io.File(dir, fileName); if (file.exists()) { file.delete(); } solo.takeScreenshot(fileName); solo.sleep(2000); return "/sdcard/Robotium-Screenshots/" + fileName + ".jpg"; } You need

Categories : Java

Phonegap android project works on emulator and in some devices but not in a 2.2 android device
Thanks to @Raoul George i discovered what was the problem. When you make: var visitedList = JSON.parse(window.localStorage.getItem("visited")); in an android 4 nothing happens, but if you work with an android 2.2 you need to be sure that window.localStorage.getItem("visited") has a value.

Categories : Android

Wrong build being deployed on Android device using Visual Studio 2012 Xamarin.Android
I have no idea why it does this, I had this issue before. I also noticed that the device log was somewhat behind (ie, at 3.30pm, the last record on the device log was 11.00am). Uninstalling the app from the device and re-deploying it seems to correct it. Note: I had this issue in VS, didn't check with XS. I would look at the difference in your deployment settings in VS and XS (I think it may have something to do with the Fast Deployment option).

Categories : Visual Studio 2012

Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
Make sure you're using an emulator based on Google APIs version 4.2.2 or higher. According to the Google Play Services SDK setup instructions: To test your app when using the Google Play services SDK, you must use either: A compatible Android device that runs Android 2.2 or higher and includes Google Play Store. The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.

Categories : Android

Android : Capturing HTTP Requests with non-rooted android device
You could install Charles(an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and SSL / HTTPS traffic between their machine and the Internet) on you PC or MAC. Config steps: Let your phone and PC or MAC in a same LAN Launch Charles which you installed (default proxy port is 8888) Setup your phone's wifi configuration: set the ip of delegate to your PC or MAC's ip, port of delegate to 8888 Lauch your app in your phone. And monitor http requests on Charles.

Categories : Android

Having issue on Real Device using vector image in android. SVG-android
On newer devices that have hardware rendering turned on by default, you need to explicitly turn on software rendering. imgView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); I suspect this is probably your problem.

Categories : Android

Android virtual Device not starting on a fresh android sdk installation
make sure : Create a environment variable called: ANDROID_SDK_HOME and set it to C:UsersAdministrator Open Eclipse > Window > Preferences and click in Run/Debug and String Substitution Add a new variable called: user.home and set it to C:UsersAdministrator Create an AVD and run it. Alternate solution i would suggest u is use android app player : Bluestack OR YouWave

Categories : Android

Is it possible to write an Android app that uses Google Maps on android device with OGL1.1?
My device does not have OGL 2 - so is it now physically impossible to write an app that uses a Map? You cannot use Maps V2. You are welcome to use OpenStreetMap or other mapping engines.

Categories : Android

Android Logcat is empty when debug with device in android studio
As of 0.4.0 I have noticed that the logcat tab does not work in the debugger window - only in the Android DDMS window (hit Alt+6 to bring up the working logcat while debugging). Awkward I know :)

Categories : Android

Declared Shared Preferences in Android causes error when run on Android device?
SharedPreferences value = getApplicationContext().getSharedPreferences("Values", MODE_PRIVATE); SharedPreferences.Editor editor = value.edit(); Move this two lines to the function Store. In your case When the class is created it will try to access the context of the application using getApplicationContext function by the time the context wont be created so wait for the onCreate to happen and then save these two values. Hope this will help. It is clear from the crash log that the context is not created. See this line Caused by: java.lang.NullPointerException 08-29 01:42:59.390: E/AndroidRuntime(29985): at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:101) Do some thing like this instead. SharedPreferences value; SharedPreferences.Editor editor; @Overri

Categories : Android

Working with android:layout_alignStart and a real Android Device
Your problem is layout_alignStart is supported from Android 4.2 (API level 17), but Galaxy Note II is 4.1.2 (API level 16). If you go to http://developer.android.com/reference/android/R.attr.html#layout_alignStart and change the API level (in the top left corner of the page) to 16 or lower, you'll see layout_alignStart entry become grayed out.

Categories : Android

How to modify android Source code and use that into Android device?
Your question is so generic. So I just suppose that you have already got to know how to build and flash your customized firmware. And here is the answer for your original requirement: To disable the navigation buttons, you should modify the file YOURANDORIDROOT/framework/base/core/res/res/values/config.xml and change the value <bool name="config_showNavigationBar">true</bool> to <bool name="config_showNavigationBar">false</bool> And some more information for your reference, you can go to framework/base/package/systemui directory and there you can find the source code of the status bar.

Categories : Android

Android device is not connected to USB for debugging (Android studio)
If you are on windows, many times it will not recognize the device fully and because of driver issues, the device won't show up. go to settings control panel hardware and sound device manager And look for any devices showing an error. Many androids will show as an unknown USB device. Select that device and try to update the drivers for it.

Categories : Android

Android App: Add Tablet and Smartphone Version in Google Play with
Pls ref [Use Compatible screen][1] Manifest for app targeting phones should have: <compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <!-- all normal size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> Manifest for app

Categories : Android

how to detect a browser supports requestFullscreen
When you put if (docElm.requestFullscreen), you are detecting if the browser supports that method because it will return true if requestFullscreen is defined on the docElmobject.

Categories : Jquery

Access one android device to another android device
It is not mandatory. You can also implement this as a server client solution, where the data transfer between the clients takes through the server. If you didn't try it yet, that will be a tedious task for the particular solution. Both side should keep services to monitor and transfer data. But if you intent a real time solution, I'll prefer Bluetooth for faster response.

Categories : Misc

Can Android NFC Peer2Peer communicate with a non-Android NFC Device (NOT Tag)?
Yes,It's possible.I developed one project like that before. In non-android device, you should implement LLCP and SNEP(or NPP) protocol. And for the phone, you should develop your own application to provide the message. In last project, we use libnfc to drive the PN532 chip on PC, then use libllcp for the LLCP layer, and implemented SNEP stack. At last develop our own service and application. Maybe you can have a try like this way, or implement the protocols I mentioned above.

Categories : Android

Finding and Android NSD-Service from a non-Android Device
The protocol you are after is http://www.dns-sd.org/ - DNS Service Discovery (DNS-SD) That seems to be the only protocolType in the current Android framework.

Categories : Java

My app won't show up on android emulator and android device
You have missed to put the action in your launcher activity <action android:name="android.intent.action.MAIN" /> your correct code look like <activity android:name="com.example.trial1.Splash" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.SPLASH" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>

Categories : Android

Need a little more clarification on Android screen size layouts for my app that supports Gingerbread to Jelly Bean
Razr is a 540x960 240dpi device if i use the formula to get dp (dp = (px / dpi) * 160) i get 360dp, right? 360dp for the smallest width, yes. For some reason its cutting resizing some icons that are not fitting. Your layout has a bug, then. It's happening because its pulling layouts from the layout folder and not layout-sw320dp. I have my layouts in layout folder set to fill background with color instead of picture because i kept getting heap errors. Then you have a bug in your color resources, where you provided a definition for some scenarios but not all. But it seemed to do what i needed to initially. I have no idea how you came to that determination. If i leave that out then my layout folder is controlling layouts for a 480x800 device all that way up to my S4

Categories : Android



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