w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to send/receive data to another device with Mono for Android using WiFi?
As described in mono api you can use binding on standard java ServerSocket and ClientSocket classes. Example of such usage you can find here. I think there is no problem in mapping java to C# code.

Categories : C#

Speed of forwarding ADB ports to send data from Android device to PC
I made an application which I started with Bluetooth, after some testing I decided to go with normal TCP sockets with the WIFI interface. The application consists of one PC which handles up to 20 tablets for a commercial command entry in restaurants, discos, etc. Every time a tablet connects the server send about 100 small JPG pictures which represent the different items in the menu. It's done very fast, less than a couple of minutes, and in normal data entry I've seen no problems so far. I don't know how fast you need it to be but WIFI sockets are as least as fast as USB (2.0) and Bluetooth. Also with sockets the tablet and the PC can be hundreds of meters away from each other, depends on your WIFI configuration which can be expanded easily. Other thing to consider is when the device goes

Categories : Java

How can i Write data from Android device on c2540c device?
Might this solve your problem?

Categories : Android

Is it possible to send a computer's screen to an Android device?
Let's do some math. A 1080p screen is 1920×1080 pixels. In a bitmap, each pixel is 4 bytes (a,r,g,b). You want 60 of them per second. That ends up being 497664000 bytes/second, or 497 MB/s. 802.11n is up to 150 megabits/s. So no, you can't realistically do it without compression. Now add in compression, and/or reduce your framerate goal and it becomes doable. Edit: another technique (one used in video processing as well) would be to send only the parts which changed. That would be the best way to save bandwidth, and the idea that would probably come closest to your goal. Most frames are probably 90%+ identical.

Categories : Java

How to uninstall an android app from command line on the device
Trying using the pm command: pm uninstall <package_name> or pm uninstall -k <package_name> The -k flag keeps the data and cache directories after the package is removed. I haven't tested this myself, but I don't think this should show a warning message.

Categories : Android

Send NDEF message from Android device using Xamarin
I figured out. The main activity has to implement NfcAdapter.ICreateNdefMessageCallback and NfcAdapter.IOnNdefPushCompleteCallback interfaces. Implement CreateNdefMessage and OnNdefPushComplete methods. Call SetNdefPushMessageCallback and SetOnNdefPushCompleteCallback methods of NfcAdapter in the OnCreate method of the main activity. public class Activity1 : Activity, NfcAdapter.ICreateNdefMessageCallback, NfcAdapter.IOnNdefPushCompleteCallback { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); ... NfcAdapter adapter = NfcAdapter.GetDefaultAdapter(this); adapter.SetNdefPushMessageCallback(this, this); adapter.SetOnNdefPushCompleteCallback(this, this); } public NdefMessage CreateNdefMessage(Nfc

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

Android Device device shows Unknown (?????) in eclipse
You need to add vendor ID to android.rules file. Please follow this link to know about particular vendor id & how to do this. http://developer.android.com/tools/device.html

Categories : Android

How to connect Android device to an iOS device over BLE (Bluetooth Low Energy)
I've written a simple working example, well relatively simple, and included it open-source on Github: https://github.com/GitGarage. So far it has only been tested with an Android Nexus 9 and an iPhone 5s, but I presume it would also work with a Nexus 6 and various iPhone types. So far it is set up explicitly to communicate between one Android and one iPhone, but I presume it is tweakable to do much more.

Categories : Android

How can i create new virtual mouse device on my android device?
From what i see you should create your own virtual device with your own driver , Fortunately there is an easy way to do so using uinput There is an easy guide for getting started here , and this question can be a good guide to write your own virtual driver. I thought this can only be done if you have access to kernel , and create your own ( i dont think modifying user rom is a good solution ) , but after reading this , it is clear that Uinput can run in user mode. Note : I agree with recommendition to use touch events ; as this solution is more common and makes sense , check second suggestion is this answer

Categories : Android

How to track the device location (iOS and Android) device using Phonegap
The first thing to say is that creating a Phonegap app that receives location updates while running in the background is entirely possible, but not trivial. I've done it myself and released apps on both the Android and iOS platforms. If you need accurate and regular position updates, I'd suggest using the GPS receiver on the target devices. In Phonegap, you can do this setting the "highAccuracy" flag when requesting position updates. The watchPosition() function will deliver new position information as and when the device receives updates from the GPS receiver, so you use it something like this: navigator.geolocation.watchPosition(successCallback, errorCallback, { enableHighAccuracy: true, timeout: 10000, maximumAge: 0 }); See the Phonegap geolocation API documentation for more d

Categories : Android

Android Development - Command "adb devices" not listing my device
For the sake of anyone else still struggling with this, I found a driver package that works. I recently purchased an Ainol Novo Hero 10 II for development purposes and faced the same problem as you. This solution works for me: Source: http://www.slatedroid.com/topic/70585-adb-drivers/ If you have already installed any previous drivers but your ADB doesn't recognise it, go to your Device Mangers to uninstall and remove all existing drivers associated with your new device. Download modified USB driver from here: http://yadi.sk/d/54lX5c2O386XU This driver is UNSIGNED so install at your own risk (although it seems to work for me). Windows has a Driver Signature Enforcement that you need to disable. A google search will lead you to instructions (sorry not enough rep points to post more t

Categories : Android

How to send file / message between two android device with out any intermediate server
You can implement file transfer between two android devices using android bluetooth implementation.Go through following links it will help android bluetooth implementation basics http://developer.android.com/reference/android/bluetooth/BluetoothSocket.html http://developer.android.com/guide/topics/connectivity/bluetooth.html

Categories : Android

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

How can i send a notification from php server to the amazon kindle android device ?
Amazon Device Messaging is now available for the Kindle Fire series, forming an approximate equivalent to GCM available on more conventional Android devices.

Categories : PHP

Android/Java: search the ID of an image inside the device and send it to a client
you can get the list of images inside the gallery this way: String[] projection = new String[]{ MediaStore.Images.Media.DATA, }; Uri images = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; Cursor cur = managedQuery(images, projection, "", null, "" ); final ArrayList<String> imagesPath = new ArrayList<String>(); if (cur.moveToFirst()) { int dataColumn = cur.getColumnIndex( MediaStore.Images.Media.DATA); do { imagesPath.add(cur.getString(dataColumn)); } while (cur.moveToNext()); }

Categories : Java

What is difference between android device id and device token?
Both are completely different. Secure.ANDROID_ID A 64-bit number (as a hex string) that is randomly generated on the device's first boot and should remain constant for the lifetime of the device. (The value may change if a factory reset is performed on the device.) And GCMRegistrar.register(this.context, CommonUtilities.SENDER_ID); Gives you the registartion id of device from GCM. By which, GCM uniquely identifies the device. Another difference is Secure.ANDROID_ID may change when factory reset is performed on the device. And Registration id gets changes periodically. And if you are asking about CommonUtilities.SENDER_ID then This is your project number, and it will be used later on as the GCM sender ID

Categories : Android

Android Lock Screen App Widget: how to wake up the device (and send it back to sleep again after)
Well, I used a Handler to call wl.release() after 60 seconds: public class AppWidget extends AppWidgetProvider { @Override public void onUpdate(Context ctxt, AppWidgetManager mgr, int[] appWidgetIds) { ComponentName thisWidget = new ComponentName(ctxt, AppWidget.class); int[] allWidgetIds = mgr.getAppWidgetIds(thisWidget); Intent i = new Intent(ctxt, UpdateService.class); i.putExtra("widgetsids", allWidgetIds); ctxt.startService(i); PowerManager pm = (PowerManager) ctxt .getSystemService(Context.POWER_SERVICE); final WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "bbbb"); wl.acquire(); final Handler handler = new Handler(); handler.postDelayed(new Runnable() {

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

send raw command to lpt or com port without installing the device
You don't have to install a driver for COM or LPT peripheral device if it has a real COM or LPT. You have to have just installed drivers for COM or LPT in your PC. If you have a USB 2 COM adapter, you have to install drivers for it. But as soon as you have a working COM alias like COM1 or COM10, COM11... you can send or recieve characters with no problem if you use a right configuration for transmission. Check out SerialPort class. For parallel port check out this question.

Categories : C#

Sending data from a PC to an Android device using USB OTG
It is not possible to send data that way. Android devices running the USB-OTG will act as a USB host. A PC only has USB host capabilities. So by connecting a USB cable directly from a PC's USB port to an Android device running USB OTG, you are attempting to connect two USB hosts together - which doesn't work! That also means you won't be able to send data from the Android device to the PC using USB-OTG. If you would like to communicate between an Android device and a PC, there are other methods. Serial through USB and Android ADK come to mind.

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

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

What is the established way to request data from an android device
I would say it's the right call: Google Cloud Messaging for Android From the site Android Developer: This could be a lightweight message telling your app there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). In this case you don't want to fetch data from the server but you want to send them. You can send them in different ways. I would suggest, since you are learning, to try a RESTful solution using one of the implementation of JAX-RS.

Categories : Java

Android Media player - play from the data device
I'm not sure I understand your question correctly, you might want to try phrasing it more explicitely. If you are trying to use headset controls and system-wide control listeners, have a look at this article which explains how to implement media controls with an onKeyListener and BroadcastReceiver . EDIT: To play media that is stored on the device memory: MediaPlayer mp = new MediaPlayer(); mp.setDataSource("/mnt/sdcard/directory/audiofile.wav"); //Path to the file on the device And use either MTP, Mass Storage, or the device explorer to put the files on the device. EDIT2 : To stop media and resume playing afterwards: MediaPlayer mp = new MediaPlayer(); ...//Play media, do stuff.... int currentTime = mp.getCurrentPosition(); mp.pause(); ...//Media is stop

Categories : Android

Cannot open /data folder in a rooted Android device
If you have installed supersu like apk. When you do 'su' in the shell, there might be a notification on screen asking that if you agree the program to run 'su'. You have to grant the permission.

Categories : Android

How to safely transfer some data from a server to an android device
pack your data in a JSON package, and encrypt it on the server with the same key as the client. Ensure that the key at the mobile side is hard coded (static field) of a class, and not in any xml files. i have seen people doing this because "it's easier" but not a good practice. And then transfer it through https. (not http !) If you want, feel free to read the OWASP guide

Categories : Android

Android Tablet Reading a Data from USB Master Device
Short answer: no. Longer answer: "Android supports a variety of USB peripherals and Android USB accessories (hardware that implements the Android accessory protocol) through two modes: USB accessory and USB host." http://developer.android.com/guide/topics/connectivity/usb/index.html If Android is not acting as host, and the host is not an accessory, there is no programmatic access to the USB connection from Android.

Categories : Android

How to access package folder(/data/pakcage_name) in android device
if your device isn't root follow these steps to access that: 1- open adb 2- perform $ sudo ./adb shell 3- to access to data folder use ran-as command: shell@android:/ $ run-as app.package.name now, you can access to files of your project. but maybe you don't have permission use chmod 4- shell@android:/data/data/app.package.name $ chmod 777 databases/database_ame and also you can put/get files in/from that such as $ sudo ./adb pull /data/data/app.package.name/databases/database_ame /home or $ sudo ./adb push /home/database_ame /data/data/app.package.name/databases/database_ame Edit: By the way, if you work in linux I think you should install ia32-libs

Categories : Android

How to write a service to keep track of gprs data usage on android device
You need to do the following : Create a local database that will store the data usage values . Start a service which runs continuously / periodically to calculate /recalculate the data usage . After data usage is calculated by the service ,add the data into your data usage table . To create local database you can refer to this tutorial on sqlite Here is how you can start a service Creating a Service in Android EDIT There is no way to get notified if any fresh data usage is made .You will have to periodically check it using your service that will run continuously or periodically . You can use the following code to calculate the usage : int UID=Process.myUid(); long recived = TrafficStats.getUidRxBytes(UID); long send = TrafficStats.getUidTxBytes(UID); Other functions that you ca

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

Sencha Touch 2: no local json data shown on Android device -- in dev is all OK
You load the data from a file, so that in development Sencha finds it. But in production you did not copy the json to 'build/production/xxx/dev/akApp/app/data/dvs-tab.json' It can't be found by Sencha until you copy the data by hand or add it to: app.json -> "resources": []

Categories : Android

Android ADB stop application command like "force-stop" for non rooted device
The first way Needs root Use kill: adb shell ps => Will list all running processes on the device and their process ids adb shell kill <PID> => Instead of <PID> use process id of your application The second way In Eclipse open DDMS perspective. In Devices view you will find all running processes. Choose the process and click on Stop. The third way It will kill only background process of an application. adb shell am kill [options] <PACKAGE> => Kill all processes associated with (the app's package name). This command kills only processes that are safe to kill and that will not impact the user experience. Options are: --user | all | current: Specify user whose processes to kill; all users if not specified. The fourth way Needs root adb shell pm disable <PACKAGE&g

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

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

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

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

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

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



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