Skip to content

Commit

Permalink
fixed telephone support and made app not orient by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sintaxi committed Mar 3, 2009
1 parent d8f3e62 commit 8d42fa0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
6 changes: 3 additions & 3 deletions iphone/Classes/PhoneGapDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ @implementation PhoneGapDelegate
@synthesize imagePickerController;

void alert(NSString *message) {
UIAlertView *openURLAlert = [[UIAlertView alloc] initWithTitle:@"Alert" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[openURLAlert show];
[openURLAlert release];
// UIAlertView *openURLAlert = [[UIAlertView alloc] initWithTitle:@"Alert" message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
// [openURLAlert show];
// [openURLAlert release];
}

/*
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/PhoneGapViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ @implementation PhoneGapViewController

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation
{
return YES;
return NO;
}


Expand Down
2 changes: 1 addition & 1 deletion iphone/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIdentifier</key>
<string>com.sintaxi.phonegap</string>
<string>com.sintaxi.tel</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions iphone/PhoneGap.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
PROVISIONING_PROFILE = "9AAFB49E-E5DD-46EC-82B7-72667CA07320";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "9AAFB49E-E5DD-46EC-82B7-72667CA07320";
PROVISIONING_PROFILE = "3CC55FB0-969F-4E90-8361-E82907DF1889";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "3CC55FB0-969F-4E90-8361-E82907DF1889";
SDKROOT = iphoneos2.1;
};
name = Debug;
Expand Down
18 changes: 5 additions & 13 deletions iphone/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
navigator.ContactManager.get(suc, fail);
}

var startAccel = function() {
var suc = function(p){
alert("Accelerator is Started!\n You can now watch it");
};
var fail = function(){};
navigator.accelerometer.getCurrentAcceleration(suc,fail);
}

var watchAccel = function() {
var suc = function(a){
document.getElementById('x').innerHTML = roundNumber(a.x);
Expand Down Expand Up @@ -87,11 +79,11 @@ <h4>UUID: <span id="uuid">&nbsp;</span></h4>
<dt>Y:</dt><dd id="y">&nbsp;</dd>
<dt>Z:</dt><dd id="z">&nbsp;</dd>
</dl>
<a href="#" class="btn" onclick="startAccel();">Start Accelerometer</a>
<a href="#" class="btn" onclick="watchAccel();">Watch Accelerometer</a>
<a href="#" class="btn large" onclick="watchAccel();">Watch Accelerometer</a>
<a href="#" class="btn large" onclick="getLocation();">Get Location</a>
<a href="#" class="btn large" onclick="beep();">Beep</a>
<a href="#" class="btn large" onclick="vibrate();">Vibrate</a>
<a href="#" class="btn large" onclick="getContact();">Get Third Contact</a>
<a href="tel://411" class="btn large">Call 411</a>
<a href="#" class="btn" onclick="beep();">Beep</a>
<a href="#" class="btn" onclick="vibrate();">Vibrate</a>
<a href="#" class="btn large" onclick="getContact();">Get Fourth Contact</a>
</body>
</html>

0 comments on commit 8d42fa0

Please sign in to comment.