Yogesh Patel | 23 May 2013 06:35
Picon

Restore multiple contacts in Iphone with Phonegap

Hello Everyone,


I have written code for restore multiple contacts in Iphone with Phonegap. And i want to perform certain action after all contacts restore successfull. Its working fine if no of contacts is near about 400 if i increase no of contacts near about 1000 then its skip some(10 to 15) of the contacts. Each time when i restore i get different no of skip contacts. And for the skip contacts fail() function is not called. What should i do next? I need to change save method in cordova js?

Below is my code:

function storeContacttodevice(json1,callback) {
    var temp=0;
    var json2 = json1.split(';');
     for(var kl=0;kl<json2.length;kl++){
           var jsonparsecontact=JSON.parse(json2[kl]);
           var myContact = navigator.contacts.create(jsonparsecontact);
           myContact.save(function onSuccess(contact){
                        var mssg="Restoring contacts to your device  " + temp + "  Out Of  " + json2.length;
                        $.mobile.showPageLoadingMsg( "b",  mssg, false );
                       if(temp == json2.length - 1) {
                            return callback();
                        }
                        temp++;
                        } ,
                        function onError(contactError){
                          alert("Error in saving contacts");
                          return callback();
                        }
                        );       
    }
    
}


Thanks in advance
Yogesh Patel

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Peter Smith | 23 May 2013 03:20
Picon

Compass vs Accelerometer implemented quite differently. Why?

I am trying to understand the Cordova 2.7 (Android) implementations of compass listener (CompassListener.java) and accelerometer listener (AccelListener.java). Both of them use Android Sensors and so I would have thought their implementations would also be similar. But I find that they are actually quite differently.

  • CompassListener has a execute action "getHeading" which is called and creates the JSON result on every invocation.
  • But Accelerometer doesn't use exec at all other than to start/stop the sensors (and it uses a JS stack structure to know when to do this). The JSON result is sent to the callback each time the sensor is triggered.

The result is if I call Compass API getCurrentHeading 10000 times VS  calling Accelerometer API getCurrentAccelerometer 10000 times the performance metrics are completely different. (> 20x different in my environment). The accelerometer calls complete quickly while its callbacks continue to run asynchronously.

So my question is: Why are these two apparently similar functions implemented so differently?

Thanks.

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Panabee | 22 May 2013 23:46
Picon

In-app purchase plugin for iOS contains deprecated code -- any solutions or new plugins?

Hi there,


What are people using for in-app purchases on iOS devices?

The current IAP plug-in contains deprecated code. It references paymentWithProductIdentifier, which is deprecated as you can see here: http://stackoverflow.com/questions/10848181/what-is-the-alternative-solution-for-paymentwithproductidentifier. Based on solutions we have seen, it doesn't seem like a straightforward fix as you need to store a reference to the SkProduct object.

Are people just using this plug-in, even though it contains deprecated code?

Thanks!

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Thomas Anderson | 22 May 2013 22:57

"Class Not Found" error trying to run barcodescanner plugin for Android

I've spent a few hours trying to trace this one and I'm out of leads.


I'm running:

Cordova 2.5.0
ADT v21.1.0-569685


When I try to run window.plugins.barcodeScanner.scan(), the failure callback returns "Class not found".

My AndroidManifest.xml contains:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />

<activity android:name="com.google.zxing.client.android.CaptureActivity"
 android:screenOrientation="landscape"
 android:clearTaskOnLaunch="true"
 android:configChanges="orientation|keyboardHidden"
 android:theme=" <at> android:style/Theme.NoTitleBar.Fullscreen"
 android:windowSoftInputMode="stateAlwaysHidden"
 android:exported="false">
 <intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
 </intent-filter>
</activity>
<activity android:name="com.google.zxing.client.android.encode.EncodeActivity" android:label=" <at> string/share_name">
 <intent-filter>
<action android:name="com.phonegap.plugins.barcodescanner.ENCODE"/>
<category android:name="android.intent.category.DEFAULT"/>
 </intent-filter>
</activity>
<activity android:name="com.google.zxing.client.android.HelpActivity" android:label=" <at> string/share_name">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>

My plugins.xml contains:

<?xml version="1.0" encoding="utf-8"?>
<plugins>
<plugin name="BarcodeScanner" value="com.phonegap.plugins.barcodescanner.BarcodeScanner"/>
</plugins>

The /src directory contains com.phonegap.plugins.barcodescanner/BarcodeScanner.java.  The CaptureActivity library is included as well.  There are no errors in the project, aside from a few minor warnings about "The value of the field BarcodeScanner.EMAIL_TYPE is not used" in BarcodeScanner.java.

Any suggestions on what to check next?

Kind Regards,
- Thomas



--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
ldeluca | 22 May 2013 20:01
Picon

Testing graceful failure on hardware not found --- ex. compass

I want to test the onError method when a device does not have compass support. 
http://docs.phonegap.com/en/2.7.0/cordova_compass_compass.md.html#compassError

Anyone know how to tell my device to temporarily turn off the compass so I can test?

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
dinesh0906 | 22 May 2013 12:24
Picon

Open pdf file...

Hello...

Any one pleas suggest me.. how to open pdf file in phone gap with example. I tried lots of days.
I can't get solution. Please help me.
How to open pdf file from web server.

Thanks in Advance. 

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Timmy Rosén | 22 May 2013 11:11
Picon

iPad app, integrated pdf viewer

Hi! I've been searching for an answer for this for quite some time now. I'm developing an iPad-app using PhoneGap and inside the app I want to be able to view pdf-files. I've looked att the integrated webview-thing and also ChildBrowser but these seem to open the pdf in a new window. I have 2 sections in my app. A sidebar with files, and a viewing area beside it. When I tap on a file, I want the pdf to show up directly in the viewing area, not taking me to a different page or away from the layout of my app.  Is this possible?  I've tried just using an iframe, or img-tag but it doesn't seem to work very well with scrolling and zooming and all that. I've also tried Google's pdf-viewer but it forces the mobile version and then it just doesn't show the pdf. It's all empty.


Is there a better way of doing this? Can the oh so mighty PhoneGap Gods step down from their thrones and guide me to a solution?

Thanks!

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Ariel Erlijman | 22 May 2013 16:00
Picon
Gravatar

Can KeyboardShrinksView and HideKeyboardFromAccesoryBar be disabled for specific pages?

Hi all. I think that KeyboardShrinksView and HideKeyboardFromAccesoryBar are great settings. 

However, as far as I understand, I set those values in the config and they are used in the app.
My question is if they can be changed to true and false when app is running.
Thx

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Jonathan Affre | 22 May 2013 10:10
Picon

Sqlit and phonegap on icenium

Hi everybody,
I try to use Sqlite in icenium using phonegap.
I can create a DB with JavaScript but i have a question and i wonder if this is normal.
In fact i created two fonction launched in onDeviceReady()
=> createDB()
=>createTables()
But i want to know why we need to create the tables on each loading of phonegap?
If I d'ont use these functions tables are erased ...
I try to understand..
Thanks you in advance

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
charl.thiem | 22 May 2013 16:21
Picon

Fileupload does not send JSESSIONID cookie on Blackberry

I am using phonegap 2.2.0 with a Blackberry App for OS 6 and 7

When uploading a file using the fileupload plugin, the JESSIONID cookie is not sent, therefore tomcat cannot identity the user session.
What I see is special about this cookie is that it is a session cookie, and a HttpOnly cookie

Any reason why this cookie is not sent with the FileUpload HTTP request?

Regards
Charl

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Alistair Dickson | 22 May 2013 13:23
Picon
Favicon

Problem with Phonegap media.play api for Android app

I'm trying to play a simple mp3 file that plays when a new screen loads, have read countless threads and still can't seem to get it to work, is driving me mad, below is my code:

<script type="text/javascript" charset="utf-8" src="cordova-2.7.0.js"> 
<script type="text/javascript" charset="utf-8"> 

// Wait for Cordova to load 
// 
document.addEventListener("deviceready", onDeviceReady, false); 

// Cordova is ready 
// 
function onDeviceReady() { 
playAudio("/android_asset/www/Screen_1_Voice.mp3"); 


// Audio player 
// 
var my_media = null; 
var mediaTimer = null; 

// Play audio 
// 
function playAudio(src) { 
if (my_media == null) { 
// Create Media object from src 
my_media = new Media(src, onSuccess, onError); 
} // else play current audio 
// Play audio 
my_media.play(); 


Are there any problems with it??
And thanks in advance.

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phonegap-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gmane