RSS

Category Archives: Uncategorized

DateUtils Extension

TextUtils extension will allow you to quickly perform such date functions as:

  • Formatting date / time, based on user requested formats
  • Obtaining date / time difference between 2 different dates. This will result in CSV text data that contains 4 elements. For example, receiving data 301,5,11,30 means the 2 dates have difference of 301 days, 5 hours, 11 minutes and 30 seconds.

For format, you can use the following patterns:

Format Pattern                         Result
 --------------                         -------
 "yyyy.MM.dd G 'at' hh:mm:ss z"    ->>  1996.07.10 AD at 15:08:56 PDT
 "EEE, MMM d, ''yy"                ->>  Wed, July 10, '96
 "h:mm a"                          ->>  12:08 PM
 "hh 'o''''clock' a, zzzz"         ->>  12 o'clock PM, Pacific Daylight Time
 "K:mm a, z"                       ->>  0:00 PM, PST
 "yyyyy.MMMMM.dd GGG hh:mm aaa"    ->>  1996.July.10 AD 12:08 PM

Interested? Get the extension here: https://sourceforge.net/projects/appybuilder

Website: http://AppyBuilder.com

Try AppyBuilder GOLD for FREE: http://FreeGold.AppyBuilder.com

Share, Like us below ūüôā

 
Leave a comment

Posted by on March 11, 2017 in Uncategorized

 

TextUtils extension

TextUtils extension will allow you to quickly perform such functions as:

  • Reverse a text to read from end to start
  • Title Case sentence
  • Format number for thousand separator and to include decimal points. This will also use proper country-based formatting!
  • Compare 2 strings to find if they are equal – can also ignore case


Interested? Get the extension here: https://sourceforge.net/projects/appybuilder

Website: http://AppyBuilder.com

Try AppyBuilder GOLD for FREE: http://FreeGold.AppyBuilder.com

Share, Like us below ūüôā

 
1 Comment

Posted by on March 9, 2017 in Uncategorized

 

Shuffling / Ordering Lists

Lists are data structures that are used to create and/or manipulate different sets of values/elements.

In AppyBuilder / AI, Lists can be created by converting a CSV data into a List such as below:

Some apps, such as game apps (e.g. cards) require shuffling or randomizing a list. The shuffling would require coding (sometimes complicated) to make the shuffling happen. AppyBuilder has now developed an extension that can be used both in AppyBuilder OR MIT AI to perform shuffling using only one Shuffle block as shown below!

The extension also includes Sorting block for sorting a list in ASCeding (1) or DESCending (-1) order:

Wanna reverse a list? Then use Reverse block as shown below:

Interested? Get the extension here: https://sourceforge.net/projects/appybuilder

Website: http://AppyBuilder.com

Try AppyBuilder GOLD for FREE: http://FreeGold.AppyBuilder.com

Share, Like us below ūüôā

 
3 Comments

Posted by on March 5, 2017 in Uncategorized

 

AppyBuilder GOLD Free

logo

AppyBuilder GOLD allows anyone to easily design and build Android mobile apps which such features as Android Material Design.

Also, along with many other features that are included in the SILVER version, it also includes ability to import MIT App Inventor projects and also has support for extensions!

You can use it for FREE by following link here: http://FreeGold.AppyBuilder.com. Later if you decide to use the premium features, just see plans HERE.

image
image

This slideshow requires JavaScript.

 
Leave a comment

Posted by on February 8, 2017 in Uncategorized

 

Text Encoding & Decoding using Lists

A list (also called an array in other programming languages) is a tool that can be used to store multiple pieces of information at once.

In this tutorial, we will learn how to create, navigate and find items in a List. For this, we will create an Android app that will parse text (e.g. user entry text) and will then encode or decode it using Lists. We will also use DRY (Don’t Repeat Yourself) concept by using¬†Procedures.

Assumptions

This tutorial assumes that user is already familiar with App Inventor Or AppyBuilder. This app is being developed using AppyBuilder, but same concept can be used in App Inventor. Source code can be downloaded using link at bottom of this post and it can be imported into FREE AppyBuilder here: http://FREE.AppyBuilder.com.

User Interface

This tutorial focuses on behaviour / logic rather than user interface and for this, it does not contain any user interface. You can tailor this code to your needs and design the user interface as needed.

Blocks

We will use Procedure to include the processing logic. However, before diving into blocks logic, take a look at image below that shows results of calling the procedure. The procedure-calls below encodes “apple peach” and then decodes it back to original text.

We now start coding the logic and start by creating three global variables:

  • varTemp – used to get¬†result of encoding or decoding of text
  • listFrom¬†and listTo¬†– These synchronized lists will contain a mapping of letters. Details on usage will be covered below.

Next, we create a Procedure. This procedure will return result. It will also take 2 parameters as shown below:

  • shouldEncode – this boolean parameter is used to indicate if we want the procedure to encode or decode text
  • someText – this parameter will be used to receive the text that procedure should encode or decode

Next, from Control drawer, we drag & drop a “do with result” block. We use this block so that we include additional blocks and also return a result when procedure completes. Plug the “do with results” into procedure return socket as shown below:

Image below shows entire code that is used for this encodeOrDecode procedure and below explains logic for each section.

  • A – In this section, we first change the passed in text as lower case. We also replace all spaces with pipe (|). The reason for this is that some list-blocks ignore blank space. So we temporarily change space to pipe and when returning final result, change pipe back to space.
  • B – In this section, we initialize our listFrom and listTo to some default values in format of CSV and then use “list from csv row” to convert CSV to list. NOTE:¬†Complete the list to include all alphabet letters
  • C – Our procedure is used to encode OR decode. If the parameter shouldEncode is false, we switch our listFrom and listTo lists
  • D – We initialize varTemp to empty string. This variable will contain the final result
  • E – We include a “for each” loop that will be repeated for the length of passed-in text. Inside this block, we will inspect each letter of the text by using the index of the loop.
  • F – Reading blocks from right-to-left, we retrieve the letter at position idx (segment), find its position (index) in listFrom (index in list), then retrieve letter at position idx of listTo (select list item). Then we append this to varTemp
  • G – In this section, we take our final varTemp, replace all the pipe (|) back to spaces and then return that as final result.

Blocks below show how to invoke above procedure and encoding or decoding text.

Source and .apk

Find this post useful or using it? Appreciate your support:  PayPal - The safer, easier way to pay online!

Like this post?  Share using button below and give us your thumbs-up

 
Leave a comment

Posted by on January 19, 2017 in Uncategorized

 

Push Notification

Push notifications let your application notify a user of new messages or events even when the user is not actively using your application. On Android devices, when a device receives a push notification, your application’s icon and a message appear in the status bar.

image

image

Design Editor

AppyBuilder SILVER plan now contains an experimental non-visible PushNotification component that can easily be added into your app. It contains simple configuration properties and blocks to enable the push notifications without any coding!

image

To enable this feature, drag-and-drop a PushNotification component onto design layout. It, currently, contains below properties:

image

  • FirebaseURL – On back-end, this component uses Firebase¬†and will be listening to any updates that your app has subscribed to. This property will need to be configured to use your own Firebase database.
  • TopicPath – Each app can subscribe (listen) to specific TopicPath. Once configured in your app, using Firebase-dashboard, you will be able to push messages to any app that is subscribed to this specific topic. TopicPath will have default value of:
    • _topic_/EMAIL_DOMAIN/APP_NAME ¬† where
      • EMAIL_DOMAIN is the domain of your email. For example if your email is jdoe@gmail.com, domain will will be jdoe
      • APP_NAME is the name of your app; e.g. LegoApp
      • Given above examples the full TopicPath will be: _topic_/jdoe/LegoApp
  • VersionCode – Push messages can be sent to ALL apps, regardless of version OR specific versions of the app. This optional property can be used to push messages to specific version of the published apps. For example,¬†updating VersionCode to 2, will update the TopicPath like below; meaning that app will be subscribed to (listen to) any messages that are sent to path below:
    • _topic_/jdoe/LegoApp/2

Blocks Editor

PushNotification includes a block that should be used to start the subscription.

image

Once subscription is started, the app will listen to messages, even if the app is not active. This block returns a boolean indicating if starting the subscription was success or not. For this tutorial, we just ignore the value. Therefore, from built-in blocks, use “Evaluate but ignore result” block and snap into PushNotification.StartSubscription:

image

Above blocks can be added into Screen1.Initialize event-handler block. Once this is triggered, app will listen to messages, even if app is not active OR if app is closed / killed.

image

Configuring Firebase

Once Firebase account is setup, we use Firebase dahsboard (console), to add the TopicPath. For this, from your app, copy the TopicPath into clipboard. Next, in Firebase dashboard, at root level, click the + sign and paste the copied TopicPath  as shown below:

image

Above will result in child-tags being created like below. Now, the message will be pushed to your app and will display in the taskbar, even if the app is not-active or is forced-closed.

image

A notification message on device taskbar will include a title. Above will result in a default title to be displayed on taskbar. If you like to use your own title, you could use below syntax for the message.

someTitle=Hello Android!

Once the message is received by device, it will take display “someTitle” (or whatever your title is) as the title of the notification.

Conclusion

PushNotification allows you to re-engage users by delivering messages to all client apps and can be used to notify client app that for example new data is available to sync or new version of the app is available.

 

 

 
Leave a comment

Posted by on November 21, 2016 in Uncategorized

 

AppyBuilder App

image

Checkout AppyBuilder’s new app in Google Play Store¬†HERE.

This slideshow requires JavaScript.

 

 
Leave a comment

Posted by on October 31, 2016 in Uncategorized

 
 
%d bloggers like this: