w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Why is the Phonegap sample app for accelerometer not able to show phone accelerometer data on Nokia 5800?
I got the answer at Phonegap forum. In the line: <script type="text/javascript" charset="utf-8" src="cordova-x.x.x.js"></script> src should be set to "cordova.js".

Categories : Cordova

Reading files with Windows Phone 8
CommonFileQuery.DefaultQuery is not supported in Windows Phone. I'm pretty sure all the CommonFileQuery will throw an exception if you try to use. Just get files without this and use LINQ or something to order the list your self. PS : defaultquery is the default and you don't need to explicitly say it.

Categories : C#

How to get the name of a place in Nokia Maps on Windows Phone 8?
You can use the ReverseGeocodeQuery class. var rgc = new ReverseGeocodeQuery(); rgc.QueryCompleted += rgc_QueryCompleted; rgc.GeoCoordinate = myGeoCoord; //or create new gc with your current lat/lon info rgc.QueryAsync(); You can then get the data from within your rgc_QueryCompleted event handler using the Result property of the event args passed in.

Categories : C#

Windows phone 8 GeoFencing using Nokia Maps
The new GeoCoordinateWatcher API deals with this in Windows Phone 8. Geofencing and Geolocation in WP8 formed a major part of the discussion in a recent webinar on the subject - the slides can be found here. Rather than repeat the code here, I would suggest that you look at the Track My Position example which can be found in the Windows Phone 8 Maps Examples project on projects.developer.nokia.com

Categories : C#

Reading Files in Windows Phone 8: Value does not fall within the expected range
I noticed that I get that error if I use the shash / in the path to the file. Instead, if I use backslash I can get the files. Try following way: StorageFile sFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(@"AssetsDatahtm" + fileName + ".htm"); var fileStream = await sFile.OpenStreamForReadAsync(); Note that you have to place an @ before the path string to avoid the intepretation of as scape character. You could also get the file stream this way: var fileStream = File.OpenRead("Assets/Data/htm/" + fileName + ".htm");

Categories : C#

Reading a json url file in Android returns blank screen on my phone - nothing's displayed on phone
Try something like this: JSONObject jObj; JSONArray data = null; JSONObject jsonOffer; jObj = new JSONObject(data); data = jObj.getJSONArray("offers"); jsonOffer=data.getJSONObject(0); Hope it Helps!!

Categories : Android

How to run a jquery mobile webpage on Mobile phone(Android)
We use PhoneGap, jQueryMobile, Backbone, and marionette at the client side. You can also take a look at the example in here. PhoneGap is no included in this example but the example is actually part of the PhoneGap projet under the www folder. The whole point of using PhoneGap is that it allows you to develop app using HTML5/JS related technologies at the client side, with little or no changes. The repro can be run as client app from desktop browser and that is how we do most of the development and testing. Then followed by putting the whole repro under phoneGap’s www folder and it will become an app. Hope this help.

Categories : Android

How to enable reading C# Excel files on IIS (reading them locally on the machine where IIS is running works fine)?
Hi I am working with Excel at the moment in a project, from what I know adding the dll to the project is fine especially if you have no control over what you can install on the server. I know of a large project that does it like that. Microsoft recommend installing Excel on the deployment server and using Interops, which sound like what you are trying to do. I wasn't able to install excel onto our deployment server because we have to share it with other projects so I used EP Plus which is available on nuget and extremely easy to set up and use. It took less than an hour to have it generating Excel files. The only drawback with it is that it only generates xlsx files which are the newer type of excel files. This is an easier approach and it may be easier and suitable for your project. Th

Categories : C#

Reading text from a file has very slow performance, and I'd like to know why
change this: matchesText.Invoke(action); to this: matchesText.BeginInvoke(action); //Not sure about the winforms syntax for this. because the first one will have your Backgroundworker needlessly waiting for the UI to refresh, whereas the second one will not.

Categories : C#

windows phone 8 geometry transform slow performence
If you want it to be faster and you are expecting the GeometryGroup not to be modified anymore. Try calling the Freeze() method. A good reference, Should I use Geometry.Freeze here? That will give you faster performance given that the object is now immutable.

Categories : Wpf

Is it supposed to be too slow to use jQuery accordion in Mobile Browser?
You should try to avoid doing javascript animations on mobile devices. Those devices generally don't have enough resources to make it a smooth experience. Here's a (very long but good) article on why part http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/

Categories : Javascript

Loading and reading JSON file is very slow after writing in python
The way you are writing your file, you will have only one HUGE line. # example json.dump([1,2,3], fp) json.dump({"name": "abc"}, fp) json.dump(33, fp) # content of file # [1, 2, 3]{"name": "abc"}33 This may explain why it is so slow to read: it will have to load ~200mb of text in one time. Also loading it as json will probably fail. To solve it you can use instead: fp.write(json.dumps(review_object) + " ")

Categories : Python

Getting a JSON data and reading as a string is slow (compared to my browser)
It seems that webAppResponse = IOUtils.toString(new GZIPInputStream(response.getEntity().getContent()), "UTF-8"); takes most of the time (13 seconds). I once wrote this method which works pretty well. maybe it will work better than IOUtils: public String inputStreamToString (InputStream inputStream) throws IOException { StringBuilder builder = new StringBuilder(); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); String line; while ((line = reader.readLine()) != null) { builder.append(line); } return builder.toString(); } Just pass your GZIPInputStream into it. Hope it will help

Categories : Android

Will loading my app from Eclipse to my Android phone instead of AVD will speed things up? Because AVD is slow as hell
Very simply said, it absolutely will. Enable USB debugging on your device. Install phone drivers and connect your phone to your PC. When running your application choose your phone from the list and run. Read more about all steps on Using Hardware Devices, Android developer site

Categories : Android

jQuery Mobile: changepage jumpy on slow Android 4.1's devices
What transitions did you use on your pages? As far as I know, jQuery Mobile uses some CSS3 for page transitions, and some of these are not supported by lower versions of Android. For example if you use a custom slide effect on your page, on Android 4.x.x (or iOS version that supports css3) it will slide, but on Android 2.x.x the page will only fadeIn and fadeOut. You can read more of the transitions here: http://view.jquerymobile.com/1.3.2/dist/demos/widgets/transitions/ it is noted that: Important: Some platforms currently have issues with transitions. We are working on a solution to solve the problem for everyone. If you are experiencing flickers and flashes during or at the end of a transition we suggest the following workaround. Please note that this workaround should be thoro

Categories : Jquery

How should you handle slow requests (image upload from mobile) on Heroku?
Your best option is to upload the images directly to Amazon S3 and then have it ping you with the details of what was uploaded. https://devcenter.heroku.com/articles/s3#file-uploads

Categories : Ruby

Problems reading simple numeric values from files in Windows batch files
The issue here is that the entire IF expression is evaluated before the SET /P statement within it can be executed. InstalledVersion is not set yet, and so this invalid expression is evaluated: IF GEQ 2 ( Nothing inside of the IF expression executes because it cannot be completely evaluated. A solution is to enable delayed expansion and replace %InstalledVersion% with !InstalledVersion!, as described in this post. You can also restructure the code so the GEQ comparison happens after the IF expression.

Categories : Windows

Reading txt files and parsing them fast using c++ and boost memory mapped files
Streams are slow. Part is because the constraints that apply to them are onerous, part is because implementations have a tendency of being poorly optimized. Try using Boost.Spirit parsers. While the syntax takes a bit of getting used to and compilation can sometimes be very slow, the runtime performance of Spirit is very high.

Categories : C++

performance issue. The Speed is too slow while reading bytes from socket using java
Multiple very short writes to a socket in rapid succession followed by a read can trigger a bad interaction between Nagle's algorithm and TCP delayed acknowledgment; even if you disable Nagle's algorithm, you'll cause an entire packet to be sent per individual write call (with 40+ bytes of overhead, whether the write is one byte or a thousand). Wrapping a BufferedOutputStream around the socket's output stream should give you performance similar to "FORMAT 1" (precisely because it holds things in a byte array until it fills or is flushed). As John Nagle explained on Slashdot: The user-level solution is to avoid write-write-read sequences on sockets. write-read-write-read is fine. write-write-write is fine. But write-write-read is a killer. So, if you can, buffer up your little writes

Categories : Java

Windows Azure Active Directory slow authentication on mobile devices
David, Is it correct that your site is using wsfed and redirects to AAD where the client enters creds? Do you notice where the slowdown occurs, is it before the user enters cred (if they do) or after? Brent.

Categories : Azure

Update SMS as read in phone, upon reading an SMS in my app
How can I update a SMS as read in the phone, upon reading an SMS in my app. You can't, reliably. There are hundreds, perhaps thousands, of SMS clients on the Play Store. None of them have to expose some sort of API to allow third parties to somehow mark SMS messages as "read".

Categories : Android

Mobile Phone Touch Event
First of all: put your styles and scripts in separate files. For touch events, you may have a look at hammer.js Example from their website: Hammer(el).on("swipeleft", function() { alert('you swiped left!'); }); EDIT: more specific example: Hammer(document.body).on('drag', function (event) { var gesture = event.gesture, pageX = gesture.center.pageX, pageY = gesture.center.pageY, deltaX = gesture.deltaX, deltaY = gesture.deltaY; // console.log(event); Uncomment this to see all properties of the event object in your webinspector console });

Categories : Javascript

Reading Bluetooth RSSI value on Windows Phone 8
Unfortunately the is no such a function available by the WP8 SDK. Try to use the wrapper made by 32feet. This will allow you to access the PAN(Personal Area Network) Components via .NET.

Categories : C#

WIndows Phone 7 reading file to String
Try with.. string text; string filename="k.txt"; using (IsolatedStorageFile isolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { if (isolatedStorage.FileExists(fileName)) { StreamReader reader = new StreamReader(new IsolatedStorageFileStream(fileName, FileMode.Open, isolatedStorage)); text = reader.ReadToEnd(); reader.Close(); } if(!String.IsNullOrEmpty(text)) { MessageBox.Show(text); } } EDIT: In case of xml, try { using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { IsolatedStorageFileStream isoFileStream = myIsolatedStorage.OpenFile("test.xml", FileMode.Open); //you can use your filename just l

Categories : C#

hide column in bootstrap on mobile phone
Yes, this is actually the approach twitter bootstrap uses. Have a look at the source code of their grid system. The hidden-phone, ... classes (these have been renamed to hidden-xs, .. in version 3) work by just setting the "display" attribute to "none" or "block" depending on the current media query. Have a look at their responsive-utilities and mixins and look for the text 'responsive-visibility' if you want the full details. While this is 'less' and not 'css', it should be readable. If you're curious what 'less' is, visit the website at lesscss.org

Categories : Twitter

Setup WAMP to be able to access from a mobile phone
You can leave Listen 80 as is. Just find out the IP of your machine and type that into your phone. http://192.168.xxx.xxx Make sure your local machine's firewalls are configured properly to accept these connections. If you have multiple virtual hosts, you can either make sure the site you are looking to test is listed first, or you may also be able to set DNS entries into your router / gateway if you are lucky.

Categories : Wordpress

wordpress mobile clickable phone number
I figured it out. The first thing is I didn't create this site to begin with I get paid monthly by client to do updates. The graphic of the phone number was not accessible through wordpress to change the hyperlink. I had to download all the files and I found the file "header-hooks.php" In that file I could select the graphic and change it from callto to tel. I just don't get why this wasn't accessible in wordpress, but whatever. I am new to wordpress as well. Thanks for your help still Mark. That mobile browser redirect url code is pretty neat.

Categories : Wordpress

Accessing a mobile users phone number
Mobile phone number is not provided to the requesting website. That would be a privacy nightmare if it was provided. Some operators, however, provides a mobile subscriber number (which is different than the actual mobile number), which is used by the operator web services.

Categories : HTML

Can I simulate a specific mobile phone using the emulator?
If you're having a problem on one particular device, then it is likely a hardware + software bug, and simply simulating the hardware configuration will not solve your problem. That said, you can always duplicate the hardware by setting the RAM, screen size, storage etc. to its specifications. You probably won't get the same processing speed due to the fact that you're on an emulator.

Categories : Android

Why doesn't the pin-it button work on this mobile phone?
I did not provide enough detail in my attempt to simplify. The full URL has spaces in the description, such as, "delightful and fun to wear" and creating a malformed URL. As soon as I encoded for percent-sign, as "delightful%20and%20fun%20to%20wear". It worked on all of my test devices.

Categories : Misc

ASP.NET Regex to validate mobile phone number
It might be easier to to strip off all non-numeric characters (except + perhaps), then regex it, then if you need to output it, just reformat it. Here's a regex for the phone number after non-numeric characters have been stripped: ^+[1-9]{1}[0-9]{10}$ For more detailed info on country codes, see this post.

Categories : Javascript

Phone Call Events - JQuery Mobile?
you could add tel: before the number in href of anchor, like this: <a class="phone branch-a" href="tel:(22) 2222-222" title="Branch A">Branch A</a> About you being able to call from your app, you'll have to build a phonedialer yourself. Its always good to fallback on android systems whenever possible.

Categories : Jquery

json file downloading and reading windows phone 8
what you want to do is download a json then parse it. to download a json file private void GetAlbums() { WebClient webClient = new WebClient(); Uri uri = new Uri(dataFeed, UriKind.Absolute); webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(AlbumsDownloaded); webClient.DownloadStringAsync(uri); } To parse and read this file public void AlbumsDownloaded(object sender, DownloadStringCompletedEventArgs e) { // Deserialize JSON string to dynamic object IDictionary<string, object> json = (IDictionary<string, object>)SimpleJson.DeserializeObject(e.Result); // Feed object IDictionary<string, object> feed = (IDictionary<string, object>)json["feed"]; } I found this article very helpful. Y

Categories : C#

Barcode scanner for mobile phone for Website in form
I can see a couple of possibilities: Buy a cheap barcode scanner and use a pc to do it (you can find them for $25 on amazon) - the ones I'm currently using one to do what you're talking about - set focus on a text box, then scan a barcode and it fills in the textbox (behaves like a keyboard input). Write (contract out?) a custom app to do this.

Categories : Javascript

How to continuously track the location of an Android mobile phone?
Your code is probably correct, but location providers are not running when your phone is sleeping. You may need to acquire a wakelock (if you don't care about power draw), or use AlarmManager and schedule your application to wake up and check location periodically (you still need to have active wakelock while you are waiting for an update, either acquired by AlamManager, or your own).

Categories : Android

is it possible to emulate incoming phone calls to a non mobile device
You'd better use Emulator to do this Using the Emulator|Telephony Emulation. The emulator is a part of android sdk and it is free to use. I don't think a tablet without a hardware can do this. Or you may wait and watch if the others think differently.

Categories : Android

How to use (phonegap, angularjs and jquery mobile) for windows phone 8?
I would avoid JQuery Mobile in PhoneGap applications. I got to meet Andrew Trice, Adobe PhoneGap Evangelist, at a DC Droid Meet and listened to him present in a few Webinars. I've heard him say more than once that JQuery Mobile has huge performance issues. He recommended using other frameworks if possible. There are many other frameworks out there with good design, widgets, and samples that make them easy to learn. I think he even created his own called AppUI. Just look around and you'll find some really cool ones.

Categories : Jquery

Save an image to a mobile phone gallery from a browser
How about: function save(){ document.addEventListener("deviceready", onDeviceReady, false); } function onDeviceReady() { window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFS, fail); } function gotFS(fileSystem) { fileSystem.root.getFile("pic.jpg", {create: true, exclusive: false}, gotFileEntry, fail); } function gotFileEntry(fileEntry) { fileEntry.createWriter(gotFileWriter, fail); } function gotFileWriter(writer) { var photo = document.getElementById("image"); writer.write(photo.value); } function fail(error) { console.log(error.code); }

Categories : Javascript

Consistent layout, different phone resolutions, with JQuery Mobile
You should be able to do this with css media queries https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries

Categories : Android

How to draw a (topographical) map using mobile phone sensors (GPS excluded)?
This thesis is about a research conducted to identify indoor positioning using sensors available in an Android device. Hope this will give you some support to your work.

Categories : Android



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