WWDC ’11: Sold out in 10 ore

Si parla di AppleFan, informatica Commenti disabilitati
1 Stella2 Stelle3 Stelle4 Stelle5 Stelle (2 voti, media: 3,00 su 5)
Loading ... Loading ...

Sold Out da record anche per la WWDC 2011: i biglietti sono andati esauriti in 10 ore. Non siamo ai livelli di Google IO (59 minuti) ma l'entusiasmo è veramente grande.

Ovviamente ho dato il mio contributo alla causa :-)

Geolocation API

Si parla di il tecnofan, informatica, internet Commenti disabilitati
1 Stella2 Stelle3 Stelle4 Stelle5 Stelle (Nessun voto)
Loading ... Loading ...

Le Geolocation API sono una specifica del W3C (l’editor è Andrei Popescu, Google Inc, del team di Google Gears) e definiscono le API per accedere alle informazioni di localizzazione attraverso il browser.

Innanzitutto, il punto di riferimento è ovviamente la specifica del W3C: http://www.w3.org/TR/geolocation-API/ (l’editor appartiene al team di Google Gears).

Quali browser supportano le Geolocation API?
Desktop: Firefox 3.5, Opera 10, Chrome (tramite Gears “nativo”), IE 7.0+ (richiede Gears)
Mobile: Safari Mobile, Opera Mobile (richiede Gears), IE Mobile (richiede Gears) e Android Browser (tramite Gears)

Come si usano?
Il funzionamento è molto semplice, e le API vengono sono accessibili tramite Javascript.

Una doverosa premessa: la localizzazione è a carico dello UA, e non c’e’ garanzia di una risposta.

Come si ottiene la posizione attuale del device?
Tramite Javascript lo sviluppatore chiede allo User Agent la posizione attuale: a questo punto o si ottiene un risultato (asincrono) o un errore (se ad esempio le geolocation API non sono supportate). Entrambi i casi vengono gestiti tramite callback.

void getCurrentPosition(in PositionCallback successCallback, [Optional] in PositionErrorCallback errorCallback, [Optional] in PositionOptions options);

Una possibile implementazione è la seguente:

navigator.geolocation.getCurrentPosition(

function(position) {

var location = [position.address.city, position.address.region, position.address.country].join(', ');
document.getElementById('gotcha').innerHTML = position.latitude + "," + position.longitude, location);
},

function() {
document.getElementById('cantfindyou').innerHTML = "Crap, I don't know. Good hiding!";
}

);

In caso di successo si ottiene un oggetto Position definito in questo modo:

interface Position {
readonly attribute Coordinates coords;
readonly attribute DOMTimeStamp timestamp;
};

interface Coordinates {
readonly attribute double latitude;
readonly attribute double longitude;
readonly attribute double altitude;
readonly attribute double accuracy;
readonly attribute double altitudeAccuracy;
readonly attribute double heading;
readonly attribute double speed;
};

Il mio device ha il GPS. Come posso richiedere che venga utilizzato per la localizzazione?

Le API permettono di impostare alcuni filtri, utilizzando le PositionOptions

interface PositionOptions {
attribute boolean enableHighAccuracy;
attribute long timeout;
attribute long maximumAge;
};

Il parametro enableHighAccuracy è proprio quello che serve per specificare che si sta richiedendo una localizzazione ottenuta con la migliore tecnologia disponibile. Impostare questo parametro a true può allungare il tempo necessario a ottenere una risposta.

Il parametro timeout consente di definire l’intervallo massimo di tempo entro cui lo User Agent deve rispondere alla richiesta. Nel caso in cui sia stato impossibile soddisfare la richiesta, verrà invocata la errorCallback, che riceverà un PositionError di tipo TIMEOUT.

Lo User Agent molto probabilmente mantiene una cache. Il parametro maximumAge va utilizzato se si vuole definire la massima età dei dati ricevuti.

Posso richiedere il tracking della posizione?
Si. E’ possibile richiedere un aggiornamento continuo della posizione tramite il metodo watchPosition().

long watchPosition(in PositionCallback successCallback, [Optional] in PositionErrorCallback errorCallback, [Optional] in PositionOptions options);

Il funzionamento è analogo al caso di una richiesta "one time". L'unica differenza è che le callback verranno richiamate ogni volta che lo User Agent ritiene che ci sia un cambiamento di posizione.

Come disabilito il tracking?

Il tracking va disabilitato tramite il metodo:
void clearWatch(in int watchId);

Cosa mi consigli di leggere su questo argomento?

E’ tutto! :-)

iPhone OS 3.0: the next step…

Si parla di il tecnofan, informatica 4 Commenti »
1 Stella2 Stelle3 Stelle4 Stelle5 Stelle (1 voti, media: 5,00 su 5)
Loading ... Loading ...

…towards iPhone World Domination!!!

iphone-os-preview-hero20090317

Ma vediamo cosa è cambiato (fonte iPhone Dev Center). Ho aggiunto qualche micro commento qua e la… in generale direi che è veramente un aggiornamento epocale.

Apple Push Notification Service

The Apple Push Notification Service provides a way to alert your users of new information, even when your application is not actively running. Using this service, you can push text notifications, trigger audible alerts, or add a numbered badge to your application icon. These messages let users know that they should open your application to receive the related information.

Cut, Copy, and Paste

In iPhone OS 3.0, the UIKit framework provides new classes to support pasteboard operations and also incorporates selection and pasteboard behaviors into some existing UIKit views.

Era ora :-)

Accessory Support

The External Accessory framework (ExternalAccessory.framework) provides support for communicating with hardware accessories attached to an iPhone or iPod touch device. Accessories can be connected through the 30-pin dock connector of a device or wirelessly using Bluetooth. The External Accessory framework provides a way for you to get information about each available accessory and to initiate communications sessions. After that, you are free to manipulate the accessory directly using any commands it supports.

In App Purchase Support

The Store Kit framework (StoreKit.framework) provides a means for you to make additional content and services available from within your iPhone applications. For example, you could use this feature to allow the user to unlock additional application features.

Peer to Peer Support

The Game Kit framework (GameKit.framework) lets you add peer-to-peer network capabilities to your applications. Specifically, this framework provides support for peer-to-peer connectivity and in-game voice features. Although these features are most commonly found in multiplayer network games, you can incorporate them into non-game applications as well.

Figata! Così potremo giocare tutti insieme appassionatamente a CroMag Rally!!! Altro che la Wii!

Maps API

The Map Kit framework (MapKit.framework) provides a map interface that you can embed into your own application. Based on the behavior of this interface within the Maps application, this interface provides a scrollable map view that can be annotated with custom information. You can embed this view inside of your own application views and programmatically set various attributes of the map, including the currently displayed map region and the user’s location. You can also define custom annotations or use standard annotations (such as a pin marker) to highlight regions of the map and display additional information.

Questa era un must, Android ha queste API native fin dalle prime release…

iPod Library Access

Several new classes and protocols have been added to the Media Player framework (MediaPlayer.framework) to allow access to the user’s audio library. You can use these classes to perform the following tasks: · Play audio items from the user’s library. This support lets you play all audio types supported by the iPod application. · Construct queues of audio items to play back. · Perform searches of the user’s audio library. · Access the user’s playlists (including smart, on-the-go, and genius playlists).

Audio Recording and Management

The AV Foundation framework (AVFoundtion.framework) includes the following new classes and protocols for recording audio and managing audio sessions

Core Data

The Core Data framework (CoreData.framework) is a technology for managing the data model of a Model-View-Controller application. Core Data is intended for use in applications where the data model is already highly structured. Instead of defining data structures programmatically, you use the graphical tools in Xcode to build a schema representing your data model.

In App Email

The Message UI framework (MessageUI.framework) is a new framework that provides support for composing and queuing email messages in the user’s outbox.

Streaming Video

In iPhone OS 3.0, there is now support for the playback of live video streamed over http. Streamed content can be played back on an iPhone OS–based device using the MPMoviePlayerController class. The semantics of using this class have not changed. The main differences are in the preparation of the streamed content and how it is published on a web server.

Safari Features

In iPhone OS 3.0 and later, Safari supports the audio and video HTML elements, which allow you to embed audio and video content into your web applications. Safari also supports the Geolocation JavaScript classes, which work with the onboard location services to retrieve the current location of the device.

Shared Keychain Items

In iPhone OS 3.0 and later, it is now possible for you to share Keychain items among multiple applications you create. Sharing items makes it easier for applications in the same suite to interoperate more smoothly. For example, you could use this feature to share user passwords or other elements that might otherwise require you to prompt the user from each application separately.

3 good reasons for NOT jailbreaking your iPhone 3G

Si parla di il tecnofan 1 Commento »
1 Stella2 Stelle3 Stelle4 Stelle5 Stelle (2 voti, media: 4,50 su 5)
Loading ... Loading ...

I did it. I wished I never did. And I rolled back to the original 2.1 firmware. This my story.

  1. If you’re an iPhone developer, sooner or later you may wish to debug your application on a real device. With a jailbrokern iPhone, you just can’t (or at least I’ve never found a way to debug any application).
  2. The phone becomes terribly slow. Even worse than Windows Mobile. I can’t wait 30+ seconds any time I want to send an SMS. Things become a bit faster if you remove SSH from Cydia.
  3. The phone becomes terribly unstable. Never seen so many memory errors altogether.

Ok, there are at least three or more reasons for jailbreaking anyway: Cydia is wonderful and there are so many free applications which are worth a try.