Thanks, I got it
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.loudspeaker">
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<!-- For more details, see: https://github.com/ShreyashSaitwal/rush-cli/wiki/Android-Manifest-File -->
<application>
<!-- <activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> -->
</application>
But no permission prompt when app starts
check app settings what are the permissions granted maybe it i already granted
The uses-permissions
tag only grants your app to use functions which requires this permission, when the protection level of the permission is normal, or allow your to prompt the user to grant the permission either from within your app or manually from the app settings, if the permission protection level is dangerous.
Declaring the permission using the uses-permission
tag, will not prompt the user to grant the permission, you have to programmatically do it, Appinventor provides an easy approach to do that by invoking the Form.askPermission(String, PermissionRequestHandler)
method.
However, for your case, you will not require to prompt the user to grant the permission, because it’s protection level is already normal, you can safely use the methods that needs this permission after declaring it in rush’s AndroidManifest.xml, as you did.
This post was flagged by the community and is temporarily hidden.
Rush 1.1.1
What’s new
-
You can now see how much time each build took.
-
…umm, yeah. That’s it. This is not a major release after all.
Bug fixes
-
Fixed the inconsistent behavior of property-type blocks. [ref]
-
Fixed the issue where the extension’s assets and the license file won’t get compiled within the AIX file.
-
Fixed the unnecessary invalidation of caches while building the extension. This resulted in slightly increased build times.
-
Fixed the issue that sometimes caused the Java warning to show more than once.
-
Fixed some other minor issues.
Internal changes
- There’s been quite a few improvements in the working of the Rush installer (a.k.a
rush-init
). You, as an end-user, won’t notice many changes (expect the perky progress bar ), but this will lay the foundation for an upcoming feature that will allow you to upgrade Rush without leaving your terminal.
Installation
-
If you already have Rush installed on your computer, simply download the Rush installer for your OS from the latest release and run it.
-
If you don’t have Rush installed, follow this wiki to install it.
Cheers,
Shreyash
wow 1 sec!!!
It’s likely that’s just boilerplate code you get, nothing special. Larger extensions will take a longer amount of time to build (normally 5 to 8 seconds for me), as usual.
Rush 1.1.2 HOTFIX
With the previous release (v1.1.1), an issue cropped up that caused the APK creation to fail if the extension used any external library.
So, if you recently upgraded Rush to v1.1.1, I urge you to upgrade it to v1.1.2 ASAP.
Bug fixes
- Fixed the issue that caused APK creation to fail when using external libraries.
Installation
-
If you already have Rush installed on your computer, simply download the Rush installer for your OS from the latest release (v1.1.2), and then run it (it will only update the affected files).
-
If you don’t have Rush installed, follow this wiki to install it.
Cheers,
Shreyash
Can you help me?
I followed all the steps to install Rush, then I went to build, there is practically nothing there, I just created it and when I went to build it, it returned these errors.
Have you installed JDK 8?
Yes
You have JRE; you need to install JDK (version 8).
Hello all!
Recently I conducted a survey, which very few participated in. Previously I was trying to convince @Shreyash to include the Android R Prebuilt Platform SDK in Rush, which would allow extension developers to develop extensions for Android R. Currently if you type Build.VERSION_CODES.
into IntelliJIDEA (or an IDE with “code completion”), Build.VERSION_CODES.R
will not appear. That is because Rush is using the The Android Q Prebuilt Platform SDK, which App Inventor uses since they target Android Q. @Shreyash will not be including the Android R Prebuilt Platform SDK in Rush, but instead stick to App Inventors cycle (which is slow).
Although it’s at his discretion to include the Android R Platform SDK or not, you could of course upgrade it locally by yourself. There are two ways to do this.
- Globally
- Per-project
To make sure you understand the process, this is only meant for IDEs which have “code completion” for Java (and when building with Rush, since it checks methods against dependencies), such as IntellIJIDEA. The “dev-deps” directory is meant for development dependencies and aren’t included in your final extension, they are simply there so that your IDE can use “code completion,” which makes it easier for you to code!
Globally
This is a good guide if you want to replace the “android.jar” automatically for future created projects. If you have previously created projects, follow the “Per project” guide.
- Locate the folder that Rush has created; “C:\Users\user\AppData\Roaming\rush”
- This was created with v1.1.0. You will have to find the directory which you unzipped Rush into if you still use anything below v1.1.0.
- Now go into “dev-deps”
- This is where development dependencies are located, they aren’t included with your extension.
- Download the Prebuilt Platform SDK from one of the following links
-
Android R Prebuilt Platform SDK from MEGA.NZ
- The Android R Prebuilt Platform SDK is from the official release of Android R.
-
Android S Prebuilt Platform SDK from MEGA.NZ
- The Android S Prebuilt Platform SDK is from the Android S Beta 1. I will modify the link when the candidate release for Android S is released.
-
Android R Prebuilt Platform SDK from MEGA.NZ
- Now that you’ve downloaded one of the Prebuilt Platform SDKs, you can rename it to “android.jar”
- Drag and drop the new “android.jar” in place of the old one
- Create a new project with Rush by running “rush create ProjectName” in a command prompt, and you’re set to go!
- This change won’t take affect on previously created projects. Follow the “Per project” guide if you want to upgrade a previously created project.
Per project
Steps between this and the “Global” guide are similar, however, directories and some steps are different.
- Locate the folder of your project; “C:\Users\user\Desktop\ProjectName”
- Now go into “dev-deps”
- This is where development dependencies are located, they aren’t included with your extension.
- Download the Prebuilt Platform SDK from one of the following links
-
Android R Prebuilt Platform SDK from MEGA.NZ
- The Android R Prebuilt Platform SDK is from the official release of Android R.
-
Android S Prebuilt Platform SDK from MEGA.NZ
- The Android S Prebuilt Platform SDK is from the Android S Beta 1. I will modify the link when the candidate release for Android S is released.
-
Android R Prebuilt Platform SDK from MEGA.NZ
- Now that you’ve downloaded one of the Prebuilt Platform SDKs, you can rename it to “android.jar”
- Drag and drop the new “android.jar” in place of the old one
- If you’re asked if you want to overwrite the old “android.jar,” select “Yes”
- Select “File” then “Reload all from Disk” from IntelliJIDEA
- If you don’t use IntelliJIDEA, restart your IDE for changes to take affect. This might automatically happen though.
- Sometimes IntelliJIDEA will automatically do this, however, we want to make sure it actually happens!
- Start coding and build your extension with Rush by running “rush build” in a command prompt, and you’re set to go!
Downgrade to JDK 8; compiling against versions higher than that isn’t currently supported.
Try this version jdk - 1.8.0
https://www.oracle.com/in/java/technologies/javase/javase8u211-later-archive-downloads.html#license-lightbox
first remove jdk bin path if there is any
then install the jdk from above link
install it and add bin path to system variable
Getting error
Processing the extension
Unhandled exception:
FileSystemException: Cannot copy file to ‘C:\Users\varsha\AppData\Roaming\rush\workspaces\varsha.com.n.h\raw\x\varsha.com.n.h\components.json’, path = ‘C:\Users\varsha\AppData\Roaming\rush\workspaces\varsha.com.n.h\classes\simple_components.json’ (OS Error: The system cannot find the file specified.
, errno = 2)
#0 _File.throwIfError (dart:io/file_impl.dart:635)
#1 _File.copySync (dart:io/file_impl.dart:340)
#2 Generator._generateRawFiles (package:rush_cli/generator/generator.dart:45)
#3 Generator.generate (package:rush_cli/generator/generator.dart:28)
#4 BuildCommand._process (package:rush_cli/commands/build_command/build_command.dart:261)
#5 BuildCommand._compile. (package:rush_cli/commands/build_command/build_command.dart:231)
varsha@varsha-PC MINGW64 ~/Documents/RUSHAIX/rush/bin/h
Is this is the default starter extension template that you’re trying to compile? If it’s not, then it’s likely that you haven’t declared any block annotation in the extension. This is a known bug where, if there’s no block annotation declared, Rush crashes, causing the build to fail.
Edit: I’ve fixed this issue for the upcoming release.