Page 1 of 1

iOS notification center external added to mergExt

Posted: Thu Jul 26, 2012 5:49 am
by monte
Hi LiveCoders

There's still a few hours left of RunRev's 30% off SUMMERSALE so I thought I'd put another external out to make mergExt even more deliciously tempting (sorry Andre's been talking about chee.. woops).

Anyway, mergNotify is a great little external that allows you to hook into any notification from the iOS Notification Center. These are notifications are from the classes in the iOS SDK. For example, UIApplicationWillResignActiveNotification and UIApplicationDidBecomeActiveNotification help you manage the device being put to sleep while your app is running. Read more at http://mergext.com

Tell me what you want next in the Poll at http://facebook.com/mergoulding

Regards

Monte

Re: iOS notification center external added to mergExt

Posted: Sat Jul 28, 2012 6:56 am
by jr180180
awesome man!

Re: iOS notification center external added to mergExt

Posted: Sun Jul 29, 2012 5:20 pm
by tzenobite
hi to all

i'm interested in mergext, at least to a couple externals for now, the iad and the a/v ones
some questions:
1) it's possible to place more iad banners in the same card?
2) the a/v thing give to the app the full control of the camera? do i have the camera right inside my app? it's possible to overlap something to the viewer (like a grid for example) and/or resize the captured area?

thanks!

Re: iOS notification center external added to mergExt

Posted: Mon Jul 30, 2012 4:48 am
by monte
Hi tzenobite

At the moment the iAd external just does the bottom of the screen and only a single ad. I'm not planning any major development work on it now that there's ads in the engine. Multiple ads on a screen seems like a rare use case though to me.

The camera control presents a view on top of your stack. Just like the native browser control. All live code objects are under it but it is possible to place a web view with a transparent png in it over the top by just creating the mergAV control first. You can resize the mergAV control to any rect and alter the resolution of the captured image/video.

Cheers

Monte

Re: iOS notification center external added to mergExt

Posted: Fri Sep 04, 2020 9:09 pm
by marksmithhfx
monte wrote:
Thu Jul 26, 2012 5:49 am
Anyway, mergNotify is a great little external that allows you to hook into any notification from the iOS Notification Center. These are notifications are from the classes in the iOS SDK. For example, UIApplicationWillResignActiveNotification and UIApplicationDidBecomeActiveNotification help you manage the device being put to sleep while your app is running. Read more at http://mergext.com
Monte
Hey Monte, is UIApplicationWillResignActiveNotification still working? I've been trying it at the suggestion of Elanor and not having much luck. My basic strategy was to put the following code in a very simple program, compile it and see what I got back in the sandbox.

Code: Select all

on preOpenStack
   if the environment is "mobile" then
      mergNotify "UIApplicationWillResignActiveNotification" 
   end if
end preOpenStack
and

Code: Select all

on UIApplicationWillResignActiveNotification
   open file specialFolderPath("documents") & "/myData.txt" for write  -- creates a file for LiveCode to write to
   put "Rotten Wood" into myText  -- places the text "Rotten Wood" into a local variable
   write myText to file specialFolderPath("documents") & "/myData.txt"  -- writes the text placed in the local variable into the open text file we created
   close file specialFolderPath("documents") & "/myData.txt"  -- closes/saves the text file containing the text form the field/local variable into a text file on the desktop
end UIApplicationWillResignActiveNotification
So far, nothing has shown up in the documents folder when I press the "home" key and shutdown the app. I put the same code into a button and it executed fine and created the file.

Any tips, advice or suggestions?
Thanks
Mark

Re: iOS notification center external added to mergExt

Posted: Fri Sep 11, 2020 3:38 pm
by marksmithhfx
marksmithhfx wrote:
Fri Sep 04, 2020 9:09 pm
So far, nothing has shown up in the documents folder when I press the "home" key and shutdown the app. I put the same code into a button and it executed fine and created the file.

Any tips, advice or suggestions?
Thanks
Mark
Responding to my own previous message, the problem is now solved and the code works fine. The issue was that during the search for automatic inclusions it was not including mergNotify (Great sleuthing on the part of Elanor to notice this). I was able to add it manually and everything is working fine now.

Mark

Re: iOS notification center external added to mergExt

Posted: Fri Sep 11, 2020 3:47 pm
by Klaus
Hi Mark,

unless you have to deal with VERY large (text)files, you may want to use the shorter URL syntax:

Code: Select all

on UIApplicationWillResignActiveNotification
  put specialFolderPath("documents") & "/myData.txt" into tFile
  put "Rotten Wood" into url("file:" & tFile)
end UIApplicationWillResignActiveNotification
Best

Klaus

Re: iOS notification center external added to mergExt

Posted: Sat Sep 12, 2020 2:39 pm
by marksmithhfx
Klaus wrote:
Fri Sep 11, 2020 3:47 pm
Hi Mark,
unless you have to deal with VERY large (text)files, you may want to use the shorter URL syntax:

Code: Select all

on UIApplicationWillResignActiveNotification
  put specialFolderPath("documents") & "/myData.txt" into tFile
  put "Rotten Wood" into url("file:" & tFile)
end UIApplicationWillResignActiveNotification
Best
Very nifty. Thanks Klaus

Mark