0

Just wondering anyone have success implementing the following native extension?

Somehow I couldn't get it to work.

When I did a check on if(NativeAlert.isSupported) it returned me true. However the alert dialogue never showed up.

import pl.mateuszmackowiak.nativeANE.alert.NativeAlert;
import pl.mateuszmackowiak.nativeANE.NativeDialogEvent;
import pl.mateuszmackowiak.nativeANE.toast.Toast;

NativeAlert.defaultTheme = NativeAlert.ANDROID_DEVICE_DEFAULT_DARK_THEME;// not necessary
if(NativeAlert.isSupported){
    NativeAlert.show( “some message” , “title” , “first button label” , “otherButtons,LabelsSeperated,WithAComma” , someAnswerFunction);
}else{
    _modalDialogue.simplecloseModalDialoge();
}
//NativeAlert.dispose(); //only when exiting app
//Toast
Toast.show(“some message”,Toast.LENGTH_LONG);
var randX:int = Math.random()*600;
var randY:int = Math.random()*600;
Toast.showWithDifferentGravit(“some message”,Toast.LENGTH_SHORT,Toast.GRAVITY_LEFT,randX,randY);

I have an iPad1 and Adobe Air 3.4, flash CS5

Hugo Dozois
  • 8,147
  • 12
  • 54
  • 58
Bill
  • 17,872
  • 19
  • 83
  • 131
  • 1
    Just a heads up, AIR 3.4 supports IOS push notifications out of the box, no ANE needed. I'd rather use that than an ANE that might stop working with future AIR updates. You'd still need one for Android, though. – AlBirdie Sep 14 '12 at 05:40
  • o yeah push notification i almost forgot that!!! – Bill Sep 14 '12 at 05:44
  • 1
    Oh wait, I just realised that the native alert isn't the same as a push notification. Although the appearing window is basically the same, the underlying services are completely different. Push notifications are send from a server, whereas alerts are simply local notifications. Sorry, I'm so focussed on push notifications at the moment, I totally messed this up! – AlBirdie Sep 14 '12 at 05:48
  • Yes i just realize that as well LOL That's ok. have you ever tried native alert? Maybe it's because its complied under Air 3.2 and therefore it doesn't work on 3.4 – Bill Sep 14 '12 at 05:52
  • It could potentially be a packaging issue. Can you post the adt command line you are using to package your app? – Michael Sep 14 '12 at 23:08
  • what do you mean packaging issue? i dont use adt command line to package the app, just hit the publish button that's all. Does that means i need to use command line to package the app? Thanks – Bill Sep 16 '12 at 10:49
  • You're using *smartquotes!* – Cilan Feb 04 '14 at 03:20

2 Answers2

0

You're using smartquotes. Replace “ and ” with ".

Cilan
  • 13,101
  • 3
  • 34
  • 51
0

I suggest you to use a different ANE, from a different developer and test again. I use the one from freshplanet (opensource in github) and works perfect.

Here is a post where you can find more infos... http://www.redcodelabs.com/2014/03/adobe-air-native-alerts-using-anes/

Adrian Pirvulescu
  • 4,308
  • 3
  • 30
  • 47