iOS notification center external added to mergExt

Find out what's going on with LiveCode (the company), product releases, announcements, and events.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1561
Joined: Fri Jan 13, 2012 1:47 am
Contact:

iOS notification center external added to mergExt

Post by monte » Thu Jul 26, 2012 5:49 am

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
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

jr180180
Posts: 12
Joined: Fri Apr 20, 2012 8:59 am

Re: iOS notification center external added to mergExt

Post by jr180180 » Sat Jul 28, 2012 6:56 am

awesome man!

tzenobite
Posts: 57
Joined: Sun Dec 04, 2011 3:59 pm
Location: italy

Re: iOS notification center external added to mergExt

Post by tzenobite » Sun Jul 29, 2012 5:20 pm

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!
how many hypercardist are needed to change a light bulb? one to actually do it while at least a dozen more are finding out a slightly different way to do it

proudly hypertalking since 1989

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1561
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: iOS notification center external added to mergExt

Post by monte » Mon Jul 30, 2012 4:48 am

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
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 554
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: iOS notification center external added to mergExt

Post by marksmithhfx » Fri Sep 04, 2020 9:09 pm

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
macOS 10.15.6, Xcode 11.5, LC 9.6.1, iOS 13.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 554
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: iOS notification center external added to mergExt

Post by marksmithhfx » Fri Sep 11, 2020 3:38 pm

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
macOS 10.15.6, Xcode 11.5, LC 9.6.1, iOS 13.6.1
Targets: Mac, iOS

Klaus
Posts: 11969
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: iOS notification center external added to mergExt

Post by Klaus » 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

Klaus

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 554
Joined: Thu Nov 13, 2008 6:48 am
Location: London, UK

Re: iOS notification center external added to mergExt

Post by marksmithhfx » Sat Sep 12, 2020 2:39 pm

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
macOS 10.15.6, Xcode 11.5, LC 9.6.1, iOS 13.6.1
Targets: Mac, iOS

Post Reply

Return to “Announcements”