Status update 2 -- I spent the last month laying the foundation of the new update, implementing a few new features, and mostly, refactoring the horrible spaghetti only God knows which drunk head wrote (no, don't look at me).
We now have a mostly working dependency management system in place, written entirely from scratch to best meet Rush's needs. Along with that I recently added support for the helper blocks. The multi-component extensions are also supported now.
Talking about beta testing, I will certainly start it in a couple of days. I wanted to start it by the end of the last month, but things were mostly half-baked and/or broken and it didn't really made any sense to beta-test at that phase. If you're interested in beta testing Rush, PM me here on the community or on Discord (my username: shreyash#4002).
Also, if you have any feature requests, suggestions, or bug reports, now is the right time to let me know about them. Bring them on!
Before we finish, here's a peek at a handy little feature I implemented to view the dependency tree of your extension project. This screenshot is from my media-notification extension.
There's the official documentation here to help you get started with Rush. It expects you to have previous knowledge of developing extensions.
If you're completely new, you can follow this blog post by me that guides you through the basics of extension development. Even though in that post I use AI2's extension-template to create an extension, you can still follow it with Rush with a few changes:
You don't need to manually create the extension source file as mentioned in the "Getting started section". Running rush create extension-name creates it for you.
You don't need to add the following annotations:
@DesignerComponent: This is replaced by the rush.yml config file. More info about it here.
@SimpleObject
Instead of running ant extensions, you run rush build to build your extensions.
There are also some video tutorials by @ZainUlHassan and @AkshatRana on their respective YouTube channels (kudos to them ):
The top arrow points to the line that I was instructed to add in this guide. How can I add admob extension to my app?
I do not know if the line is correct. For example, the star at the end of the line.
Furthermore, I don't know if the @UserPermissions line and the @UsesApplicationMetadata line are in the correct place.
Here's the text from this picture. (my .java file that was created when I ran rush create <projectname>
@SimpleFunction(description = "Returns the sum of the given list of integers.")
public int SumAll(YailList integers) {
int sum = 0;
for (final Object o : integers.toArray()) {
try {
sum += Integer.parseInt(o.toString());
} catch (NumberFormatException e) {
throw new YailRuntimeError(e.toString(), "NumberFormatException");
}
}
return sum;
}
}
Here is the contents of the rush.yml file.
# For a detailed info on this file and supported fields, check out the below link:
# https://github.com/ShreyashSaitwal/rush-cli/wiki/Metadata-File
---
name: NameName
description: Extension component for PackageName. Created using Rush.
version:
number: auto
name: '1'
authors:
- BlahBlah
build:
release:
# Optimizes the extension on every release build.
optimize: true
# If enabled, you will be able to use Java 8 language features in your extension.
desugar:
enable: false
desugar_deps: false
assets:
# Extension icon. This can be a URL or a local image in 'assets' folder.
icon: icon.png
# Extension assets.
# other:
# - my_awesome_asset.anything
# Extension dependencies (JAR).
# deps:
# - my_awesome_library.jar
Your build is failing because you don't have Java Development Kit (JDK) installed. Make sure to install version 8 (or 1.8).
Also, there are no UsesPermissions, UsesApplicationMetadata and similar annotations in Rush. You need to define required manifest tags in the AndroidManifest.xml of your extension.
I got this Runtime ErrorA required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Can anyone show me the content of the AndroidManifest.xml file so that I can just put in my app ID?
I built a rush extension and it seems to be causing errors when I try to use the companion so I am just going to put it together, hoping that everything is fine and that the admob stuff just simply doesn't work inside the App Inventor Companion.
Although, I have one last concern.
Do I need to integrate these blocks in some specific way to make my rush extension work? (as in, do I need to call it so that the app ID is being identified)
![Screenshot_20221104-212652|259x500]
You'd usually do this in your extension's code, not in the blocks. I just quickly went through the getting started guide of AdMob Android SDK, and this is what the configure your app section's 3rd point says:
"Add your AdMob app ID (identified in the AdMob UI) to your app's AndroidManifest.xml file. To do so, add a <meta-data> tag with android:name="com.google.android.gms.ads.APPLICATION_ID". You can find your app ID in the AdMob UI. For android:value, insert your own AdMob app ID, surrounded by quotation marks.
In a real app, use your actual AdMob app ID, not the one listed above. If you're just looking to experiment with the SDK in a Hello World app, you can use the sample app ID shown above."
If you are not familiar with what Android manifest is, take a look at it's documentation here: