w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Direct Wifi Communication between android smartphone and other devices
In order for this to work, you must have the computer'shardware properly configured and your software must be written to communicate with this hardware. In the following guide, they suggest communicating with the hardware via the iwpriv application which handles the p2p information received directly from the Wifi adapter's driver. If you choose to do this, you will need to learn how iwpriv works and can interact with your application. guide: http://dishingtech.blogspot.com/2012/01/realtek-wi-fi-direct-programming-guide.html In order to get Wifi Direct working on an Android tablet, I suggest following the Wifi Direct sample which is available in /samples/android-/. This sample allows you to connect direct to other Wifi Direct devices and transfer an image. You can slightly alter this app

Categories : Android

Android/WiFi Direct - how find pc with the smartphone and establish a connection
The PC does not need to be on a wireless network (that is the whole point of using Wifi-Direct) but to enable Wifi-Direct on a PC, you need to install the Intel MyWifi Dashboard software (full version) and also need to make sure that your drivers are updated. (http://www.intel.com/support/notebook/sb/CS-033660.htm)

Categories : Misc

How to use Android mobile as Remote control for wifi enabled raspberry pi car , without using any access point/wifi router
as of now i have used USB/Wifi tethering method which has worked for me.i first tried with USB tethering , it was assigning some IP to Rpi. i changed the /etc/network/interfaces file so that this IP remain static. i used android Ip address as gateway and was able to ping them and even i was able to SSH from connectBot app. i think the same approah will work for wifi also. i will give it a try later. this discussion can be closed now :) my issue was resolved.

Categories : Misc

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 4.2:turning off wifi when wifi direct is enabled
Try this code Button btnWiFi = (Button)findViewById(R.id.btnWiFi); btnWiFi.setOnClickListener(new OnClickListener() { @SuppressWarnings("deprecation") @Override public void onClick(View arg0) { // TODO Auto-generated method stub WifiManager wifi =(WifiManager)getSystemService(Context.WIFI_SERVICE); if(wifi.isWifiEnabled()) { Toast.makeText(getBaseContext(), "WiFi is Enabled", Toast.LENGTH_LONG).show(); } else { AlertDialog builder = new AlertDialog.Builder(MainActivity.this).create(); builder.setTitle("Caution"); builder.setMessage("WiFi is Disabled.

Categories : Android

When downloading data over WiFi, how do I know I am connected using Wifi
ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); NetworkInfo info = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); More information can be extracted from NetworkInfo. Just check this reference. You'll need this permission: <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> Complementing: I am not sure if it's an Android default or a device configuration, but whenever there is an established wifi connection, 3G is automatically disabled. I tested in a few devices and all of them have this behavior.

Categories : Java

Audio Stream WiFi to WiFi - Broadcast
Yes, it is doable. You will need two major components: A network API to send/receive data , and audio capture and playback API. For network library, you can try CocoaAsyncSocket. It is quite simple to use. You can use UDP protocol with multicast address. Even thought you said you wanted to broadcast, but you would be better off using multicast ( send to a group of devices). For Audio sample how to capture and playback, check out my answer on this .

Categories : IOS

List connected devices to Android phone working as WiFi Access point
This is an answer from another stackoverflow question, I read it before two month and don´t know from which user the answer is from, but this should work. WifiManager gives You what You need: Main.java import java.util.ArrayList; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import com.whitebyte.hotspotclients.R; import com.whitebyte.wifihotspotutils.ClientScanResult; import com.whitebyte.wifihotspotutils.WifiApManager; public class Main extends Activity { TextView textView1; WifiApManager wifiApManager; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); textView1 = (TextView) findViewById(R.id.t

Categories : Android

pass string between two wifi direct connected user in android using wifi direct?
you can use socket to connect between two peers in the same network. for instance create a server socket on one of the peers on any port and then from the client side connect to that port on the other user . then you can use this socket connection to send strings, file whatever you want. for starters i would recommend you employ the server socket on the group owner so it will be easier on your client side to get the ip of the peer(i.e group owner) using the groupOwnerAddress field provided by the api refer to this -> http://www.oracle.com/technetwork/java/socket-140484.html

Categories : Android

Android transferring data between a wifi direct and non-wifi direct device
following pattern can connect via wifi. wifi direct device(P2P AP) <-> non-wifi direct device, has wifi(W) P2P AP: do wifi direct api "createGroup()", this api create wifi accesspoint P2P AP: do wifi direct api "requestGroupInfo()", this api returns WifiP2pGroup, that contains wifi accesspoint informations, such as ap name, password and other. (P2P AP to W: tell ap name and password to W device owner) W: setting app -> wireless -> search and connect wifi accesspoint created by P2P AP device. if you need auto connect to wifi accesspoint, P2P AP app should have a broadcast accesspoint name and password...

Categories : Android

Convert website to a SmartPhone App
I haven't personally used this, but it advertises that you can simply drag and drop in a WebView component and then link it to your site. Alternatively, you could create native applications for the phones you want and utilize native WebView components (UIWebView for iOS and WebView for Android) I'm sure that there are tons of tutorials on the web on how to implement each object.

Categories : Android

Is there way to use smartphone camera in PhoneJS?
From the Welcome to PhoneJS! article: With Apache Cordova (or Adobe PhoneGap) you have the capability to compile those apps to real mobile apps that can access the native platform (the camera, accelerometer, GPS, etc) PhoneJS does not have its own interface to the device hardware, but encourages the developer to use Cordova API. So the answer is: use PhoneGap to access the Camera.

Categories : Android

can app in android depends on the type of smartphone?
i mean if an app can be installed on Nexus 4 that running JB 4.2.2 and can't be instaslled on Samsung Galaxy 1 that running the same JB 4.2.2. your assumption that it's the "same JB 4.2.2" is not currect. yes, it based on the same android 4.2.2 source code, but surely some things would be different in this versions, and not necasserly UI differences. the true is that every device running entirely different OS that at least modified for the hardware binaries (drivers...) made it work in the specific hardware. besides that, each vendoe adds it addiotions to the OS (like samsung touch Weis interface..), besides that - Samsung (for example) are actually modifying exciting components (such ListView) for their own purposes (such the bounds when scrolling top..) and afterwords - you ha

Categories : Android

Find out wich uses-permission a SmartPhone supports
I guess the permissions may not be the problem. These are more or less standard permission every app wants to have today. There are some other things that are filterd by Google Playstore: <supports-screens> <uses-configuration> <uses-feature> <uses-library> <uses-permission> <uses-sdk> From the doku here Check your Manifest file if there's something special. Perhaps this might help: <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:resizeable="true" android:anyDensity="true"/>

Categories : Android

service discovery with android smartphone and other devices
We have done somethign similar between iOS and Mac devices using: http://www.multicastdns.org/ You could as well implement your own with broadcast UDP; but be aware that some network infrastructure may block these types of packets (corporate networks).

Categories : Android

Anyone know how to turn on USB debugging "ON" on Nexus Q without running the Q app on smartphone?
I found an answer. Sometime over the summer, Google turned off the Nexus Q servers, so you can no longer authenticate the Nexus Q app, which is what is used to turn on debug mode. There is an image that can be flashed to the device, in fastboot mode, that has adb (debug) mode enabled by default. I followed these steps last night and it all worked flawlessly. Here is a link that has the steps and the links to the needed downloads. http://forum.xda-developers.com/showthread.php?t=2408799 To get debug mode enabled follow these steps: (the following comes from the post on the XDA Developers Forum) To fastboot unlock your device / Credit and thanks to -> fiveipads cmd to platform-tools Reboot to the bootloader -> cover your Q with your hand -> power on nexus Q as soon as you se

Categories : Android

Download with smartphone generate xls file with PHPExcel
There's two problems with your line that sets the content disposition. It should have spaces between the words, which is a standard requirement for headers. It should be attachment if you want the file to download, as opposed to display inline. e.g. header('Content-Disposition: attachment; filename=fichie.xls');

Categories : PHP

why is my php session in the smartphone can't be destroyed after i close the web browser?
"Session" stored not on your phone - whatever its name. Its stored on the web-server. Browser send to the server only id of the session - using different methids. Server identify this id to track this uniq browser "session" and get data from stored session file or another method of session storage. When you close your browser - server known nothing about it. Ther is some processes on the server - common named GC (garbage collectors) who clean up old expired session files. Please read Sessions reference

Categories : PHP

Remember choice for current location for smartphone
No. There is no way for you to do this. Permissions for geolocation are handled by the browser itself. From the geolocation API: 4.1 Privacy considerations for implementers of the Geolocation API User agents must not send location information to Web sites without the express permission of the user. User agents must acquire permission through a user interface, unless they have prearranged trust relationships with users, as described below. The user interface must include the host component of the document's URI. Those permissions that are acquired through the user interface and that are preserved beyond the current browsing session (i.e. beyond the time when the browsing context is navigated to another URL) must be revocable and user agents must respect revoked permissions. S

Categories : Javascript

Find the position of a smartphone relative to a computer
Interesting question. You can use some NFC tags here, NFC tags are pretty cheap and work beautifully with Android. Program three (or more) tags and stick them on top of your monitor, one in the center and 2 in the two corners You can easily program the tags (e.g. NFCTaskLauncher app on Android Play store) to trigger your app when the phone is close to a tag. You can program the tag to identify which tag was close to your phone, your phone app can then interact with the app running on your desktop. The rest is your implementation detail. If you do not want to use NFC (or also want to use iOS) then there are some other tricks you can employ, like start a "mode" in your phone app where the fish is "ready" to be transferred, then as your phone accelerates it signals a move (using accel

Categories : Android

program to take screenshots from usb connected android smartphone continiously
But I need to take screenshots continously e.g. every second during several minutes You are unlikely to achieve every-second frame rates. Is there a possibility e.g. any computer programe to capture and save the screenshots from my computer continously? The DDMS tool doesn't seem to support such a request. Use Droid@Screen. Recording a video of the device would also satisfy me. Buy a device with HDMI-out support and use an HDMI recorder.

Categories : Android

Write a file world readable on smartphone's memory
Try this: String toWrite = "save me to disk"; File dir = new File(Environment.getExternalStorageDirectory(), INSTALLATION_DIRECTORY); if (!dir.exists()) { dir.mkdirs(); } File file = new File(dir, INSTALLATION_FILE); FileOutputStream out = new FileOutputStream(file ); out.write(toWrite.getBytes()); out.close();

Categories : Android

media queries for smartphone portrait, landscape and desktop?
Try adding orientation : landscape @media only screen and (min-device-width: 480px) and (max-device-width: 640px) and (orientation: landscape) { ... { See this site or this snippet for reference.

Categories : CSS

Store filepath/image locally on smartphone and upload later?
From Phonegap documentation: navigator.camera.getPicture( cameraSuccess, cameraError, [ cameraOptions ] ); The return value will be sent to the cameraSuccess function, in one of the following formats, depending on the cameraOptions you specify: A String containing the Base64 encoded photo image. A String representing the image file location on local storage (default). It would be simpler to just put the base64 in the localstorage and get it at the time of uploading, but if you prefer you should be able to store the path, then retrieve data from it and upload when you have connectivity. [EDIT] I didn't think about the problem pointed out by @jaay in the comments. What if the file changes at a later time? Maybe it is just better to store base64 data.

Categories : Javascript

Phonegap App distrubute versions for tablet OR smartphone Android
For a purely JS solution, you could look at the screen size, something like this: MIN_TABLET_SCREEN_WIDTH = 720; IS_TABLET = Math.min($(window).width(), $(window).height()) >= MIN_TABLET_SCREEN_WIDTH; IS_PHONE = !IS_TABLET; One man's small tablet is another man's large phone - it depends how big your hands are :-) So you can tweak the value of MIN_TABLET_SCREEN_WIDTH to determine what screen size is appropriate for your purposes to distinguish as a tablet or a phone.

Categories : Eclipse

Access files using PHP and secured FTP
FTP and SFTP (you tagged your post with SFTP and kinda mention it in your question title) are different things. For FTP I'd recommend using PHP's built-in FTP functions. For SFTP.. there's a PHP extension that provides for it (ssh2) but, personally, I think phpseclib, a pure PHP SFTP implementation, is easier to use. If you're using FTPS (FTP over SSL) then use the FTP extension.

Categories : PHP

How is Azure ACS authentication secured?
You specify the key which will be used for message exchange. When you configure Azure ACS in the management portal, you specify private key which will be used to sign tokens(Certificates and Keys tab). When you configure web application to use Azure ACS, reference to the certificate to validate signature is added to web.config: <issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, System.IdentityModel.Tokens.ValidatingIssuerNameRegistry"> <authority name="https://xxxxx.accesscontrol.windows.net/"> <keys> <add thumbprint="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" /> </keys> <validIssuers> <add name="https://xxxxx.accesscontrol.windows.net/" /> </validIssuers> </authority

Categories : Asp Net

Which one is more secured md5 or whirlpool (hashes) and Why?
the more bits a hash contains, the more secure. MD5 is a 128-bit string, SHA-1 is a 160-bit string and Whirlpool is a 512-bit string. Based on this alone, Whirlpool is clearly superior to both SHA-1 and MD5.

Categories : Algorithm

Consuming a secured Web Service
I think you need to accept the certificate server as follow. public static bool CertHandler(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors error) { // Says that you accept the certificate. // In production environment you have to really check if you can accept the certificate. return true; } ServicePointManager.ServerCertificateValidationCallback = CertHandler; Add these lines before the proxy creation. Namespace of ServicePointManager class is System.Net. Namespace of X509Certificate class is System.Security.Cryptography.

Categories : C#

How to know if information between 2 servers is secured (SSL)?
Not sure from your post what scripting language you are using on SerA and SerB to drive this application. But, most scripting languages give you access to an environment variable that you can use to determine whether the client's connection to the server is by way of HTTPS or HTTP. For example, in PHP, the environment variable is: $_SERVER['HTTPS']

Categories : Web Services

How to use polymorphic associations in a secured way
Since you are limiting the input to a whitelist of known values, I would consider this secure. Brakeman currently cannot tell that you are using a guard statement, so it warns about turning user input (params[:r]) into a class name, but in this case I would consider it a false positive.

Categories : Ruby On Rails

Symfony secured pages
If you turn off the security you don't have a token. Your login page have to place behind the firewall. And no you don't have to add all your single pages to your settings. Here is an example: firewalls: main: pattern: ^/ form_login: login_path: /account/login check_path: /account/login_check logout: path: /account/logout anonymous: true dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false access_control: - { path: ^/account/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/account/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/movie/, role: ROLE_USER } - { path: ^/resetting, role: IS_AUTHE

Categories : PHP

Consume Secured web service in Asp.Net MVC
I dont know what sort of service you are talking about but I suspect you are Adding it as a Service/Web reference. If thats the case then assuming its called WebService1 and that the security you are talking about it basic authentication then: WebService1 svc = new WebService1(); svc.AuthenticationHeaderValue = new WebService1.AuthenticationHeader(); svc.AuthenticationHeaderValue.UserName = "username"; svc.AuthenticationHeaderValue.Password = "password"; Try that. As I said I dont have much info on what you are trying to do so its a guess.

Categories : Asp Net Mvc

Creating a table with buttons in Android, compatible with both tablet and smartphone
this is how i did it in my app.. you can reference it. it does what you showed in the image. <LinearLayout android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" > <Button android:id="@+id/btn1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:background="@null" android:text="1" android:textColor="#0099CC" android:textSize="20sp" android:textStyle="bold" /> <Button android:id="@+id/btn2" android:layout_width="match_parent" android:layout_height="match_

Categories : Android

How to disable lower version of android applicaton in users' smartphone
You can't force users to upgrade to the newest version of your app. Really the best you can do is notify them that there is an update available for your app and encourage them to download it. For that I would start here.

Categories : Android

HTML5 player wont play video from subdomain on smartphone
try the following code if it helps: <video id="video player" width="720" height="440" controls> <source src="1.mp4" type="video/mp4" onClick=this.play()> </video> Hope this helps out

Categories : Javascript

API secured by PKCS#7 cryptographic message
This is an incomplete answer, but it may get you a little further along. If you have access to openssl, try this command to see if it can read the data: openssl pkcs7 -in resultString.txt -text After that try this in your code (The only difference from what you had is "Content" instead of "ContentType": Console.WriteLine(d.Content.ToString()); signedCms.Decode() takes a byte array, and that is probably the DER formatted message instead of the PEM formatted message that you received in the response. To get that in a byte array, you'll have to strip the header and footer (Begin/End) lines and pass the rest to this method: Convert.FromBase64String() Alternatively, you could use openssl to convert the file to DER format and then read in the bytes directly from the file. openssl

Categories : C#

Invoke Secured web service in wso2esb
Access to a secure web service in this way, I presume you use UT scenario: String trustStore = null; ConfigurationContext ctx = null; String policyFilePath = "[file_system_path]/secure_sample_policy.xml"; trustStore = "[file_system_path]/wso2carbon.jks"; System.setProperty("javax.net.ssl.trustStore",trustStore); System.setProperty("javax.net.ssl.trustStorePassword","pass_store"); ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null); this.stub = new ProxyStub(ctx); stub._getServiceClient().engageModule("rampart"); stub._getServiceClient().engageModule("addressing"); Options options = this.stub._getServiceClient().getOptions(); options.setUserName("user"); options.setPassword("pass"); options.setProperty(RampartMessageData.KEY_RA

Categories : Web Services

How to make sure Rails API is secured from CSRF?
You may see people suggest that CSRF is not an issue for API requests (there is no state to begin with, so what is there to hijack anyhow?), so some suggest the following to simply eliminate the warning: skip_before_filter :verify_authenticity_token, :only => [:your_method] However, there was some commentary that it is possible to commit CSRF with text/plain using various Flash and Java-based methods. I believe that was the reason for the security patch in rails a while back: http://weblog.rubyonrails.org/2011/2/8/csrf-protection-bypass-in-ruby-on-rails/ In any event, a good solution that actually checks for an authenticity token can be found here: WARNING: Can't verify CSRF token authenticity rails It involves actually setting the header in your request. Good luck!

Categories : Ruby On Rails

How to check if ldap connection is secured?
I finally managed to test if I’m connecting secured or not by using Wireshark. you can set the filter there to something like : tcp.port eq 636 or tcp.port eq 389 so you will see the communication through 636 and 389 ports. My conclusion is that the ldap server uses a secured connection on 636 port even if ssl is not checked in the ldp, checking it has no effect if port 636 is set. I think this checkbox purpose is to force ssl by the client, so if ssl is not supported in the port by the server, connection will not be established. When I use a secured connection from my c# code it defaults to port 636 and when it’s not secured it defaults to 389. The way to use a secure connection from the code is either to set the connection authentication type to ssl or specify the ssl port in the

Categories : Dotnet



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