Warning: Your pubspec.yaml includes an "author" section which is no longer used and may be removed - flutter

I want to publish my library and same as before, I have included author name in the pubspec file.
Running flutter pub pub publish --dry-run gives me the following warning:
Warning: Your pubspec.yaml includes an "author" section which is no longer used and may be removed
I will authorize my publishing using the email in my author value. If I remove it, how will I authorize.
I'll be thankful to know more about this.

Instead of using author or authors to verify yourself, the new way is that you make yourself a verified publisher.
According to documents:
To create a verified publisher, follow these steps:
Go to pub.dev.
Log in to pub.dev using a Google Account.
In the user menu in the top-right corner, select Create Publisher.
Enter the domain name that you want to associate with your publisher
(for example, dart.dev), and click Create Publisher.
In the confirmation dialog, select OK.
If prompted, complete the verification flow, which opens the Google Search Console.
When adding DNS records, it may take a few hours before the Search
Console reflects the changes. When the verification flow is complete,
return to step 4.

You should now use authors instead of author:
name: my_package
authors:
- me#mail.com
- another_author#mail.com
...

Related

How to setup firebase trigger-mail and cloud functions

I faced a lot of trouble setting up trigger mail extensions along with cloud functions. Here I explain step-by-step how to get things done!
Lets get working.
Set up Firebase
Create a project if you haven't already here.
To use trigger-mail extension and cloud functions, you need to
upgrade the project to BLAZE Plan.
Go on and do that now (check bottom left side of window).
Go on and set-up firestore database and storage. This is
necessary for both extension and functions to work.
Configuring Extensions
Click on Extensions panel under Build.
Find Trigger Mail extension and click on install.
Here's the main part:
Click on next 2 times.
Grant all necessary permissions.
This is where you'll link your mail account from which you'll be sending mail
You'll be greeted with such a screen ->
URI
If the mail I'm linking is xyz123#gmail.com, this will be your SMTPS format:
smtps://xyz123#gmail.com#smtp.gmail.com:465
Use this in the SMTPS connection URI field.
Password
This is a little hectic step.
Enable 2 factor Authorization in your Gmail here.
Now you would need to create an App Password
Click on Generate.
You'll see such a screen ->
You have to enter this password in the SMTP password field and click Create secret.
NOTE: Do not enter spaces.
Wait for sometime for the process to finish.
After it's done, Your screen will look like this ->
You could keep the same Gmail for Default Reply-To address as the original mail, or one of your choice.
Let Email documents collection be the same.
Click on Install Extension.
This will take few minutes.*
Voila, you're done!
Let's send a test mail.
Now in-order to send a mail, you need to add a document to mail collection in your firestore db.
Find official documentation here.
to: ['someone#example.com'],
message: {
subject: 'Hello from Firebase!',
text: 'This is the plaintext section of the email body.',
html: 'This is the <code>HTML</code> section of the email body.',
}
This is the format of document to send mail.
"to" is an array and "message" is a map .
Let's create a collection manually ->
Here's my document window
Let's save this document.
If done correctly, within few seconds, you'll see the document automatically update with more fields like attempts etc.
Check your mail for the email.
Writing a function.
Lets set up Firebase CLI
Download Node.js here.
Run the installer.
Copy the installed path in your drive.
I have mine installed under C:\Program Files\nodejs.
Search environment variables in your system tray.
Paste the directory under System Variables -> Path, create new and add.
Download and install Firebase CLI by following the steps here..
login to firebase cli using the above doc.
Open your project in code editor, and type firebase init in terminal.
Select project and add functions support. It'll create a new folder functions.
I've written a function that sends a onboarding email when a new user is created.
const functions = require("firebase-functions");
const admin = require("firebase-admin");
admin.initializeApp();
// sends mail if new user is regestired
exports.userOnboardingMail = functions.auth.user().onCreate((user)=>{
admin.firestore().collection("mail").add({
"to": [user.email],
"message": {
"subject": "Welcome to My app! Explore functionalities here.",
"text": `Hi, ${user.displayName}. \n\nIt's nice to have you on-board.`,
},
})
.then((result) => {
console.log(
"onboarding email result: ", result,
"\ntime-stamp: ", Date.now);
});
});
Hope I was able to make your day a bit easier :)
Upvote if it helped..
Additional Links
Learn firebase cloud functions here. really recommend this channel.
Official Trigger-mail docs.
Firebase CLI docs.
Firebase Cloud Functions docs

Failure to Launch Apps Due to Package Name Inconsistency

When I used huawei AppLinking Serviceļ¼Œ the app package name is queried to locate the app details page. However, the app package name varies depending on the channel. For example, for a Huawei channel, the package name ends with .huawei, which is different from that in a Google channel.Does this mean it's impossible for an App Linking link to be opened in all local app stores due to package name inconsistency?
Does this mean it's impossible for an App Linking link to be opened in
all local app stores due to package name inconsistency?
The answer is no because there is a solution to this problem.
Perform the following to resolve the issue:
We know that App Linking can redirect users to a custom website if the app has not been installed, so you can use Android intents to create custom links, in which you can configure the package name and fallback URL to be opened. The basic syntax is as follows:
intent:
HOST/URI-path // Optional host
#Intent;
package=[string];
action=[string];
category=[string];
component=[string];
scheme=[string];
S.browser_fallback_url=[encoded_full_url]
end;
Taking advantage of the preceding functions, you can:
Create a link of App Linking and use the setOpenType(CustomUrl) method to set the open type to redirect users to a custom website for the Android platform. The involved APIs are as follows:
.setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder()
.setAndroidDeepLink(Android_LINK)
.setOpenType(CustomUrl)
.setFallbackUrl(BACK_LINK)
.build())
Use an Android intent to configure the preceding custom website. Here, I use Taobao as an example:
"intent://details?id=com.taobao.taobao#Intent;scheme=appmarket;package=com.huawei.appmarket;S.browser_fallback_url=https://play.google.com/store/apps/details?id=com.taobao.taobao;end"
The process is as follows:
1.Use the appmarket scheme to start the app whose package name is com.huawei.appmarket, that is, to open HUAWEI AppGallery.
2.Pass the package name com.taobao.taobao to HUAWEI AppGallery. Then, HUAWEI AppGallery will start this package.
3.If com.huawei.appmarket is not found, set S.browser_fallback_url to a fallback URL.
4.The fallback URL is a Google Play link. Simply set id in this URL to the name of the package to be opened. In this example, the ID is com.taobao.taobao.
Ensure that an App Linking project of the Android platform has been completed. For details, visit:
https://forums.developer.huawei.com/forumPortal/en/topic/0204442462434640048?fid=0101188387844930001
Open the original App Linking project and add the following information in bold:
String BACK_LINK = "intent://details?id=com.taobao.taobao#Intent;" +
"scheme=appmarket;package=com.huawei.appmarket;" +
"S.browser_fallback_url=https://play.google.com/store/apps/details?" +
"id=com.taobao.taobao;end";
AppLinking.Builder builder = new AppLinking.Builder()
.setUriPrefix(DOMAIN_URI_PREFIX)
.setDeepLink(Uri.parse(DEEP_LINK))
.setAndroidLinkInfo(new AppLinking.AndroidLinkInfo.Builder()
.setAndroidDeepLink(Android_DEEP_LINK)
.setOpenType(CustomUrl)
.setFallbackUrl(BACK_LINK)
.build());
Test:
Install the demo on a device, create a link of App Linking, and add it to the note.
Uninstall the app to simulate the scenario where the app is not installed.
For a Huawei phone, tap Open/Download. On AppGallery that is displayed, open the Taobao details page. The following figure shows the Taobao details page in HUAWEI Browser.
For a non-Huawei phone, tap Open/Download. On Google Play that is displayed, open the Taobao details page. The following figure shows the Taobao details page in Google Chrome.
The problem is now resolved. If you encounter a similar problem, simply follow my example step by step and change the package name to resolve the issue.
For more details, please go to:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-introduction?ha_source=hms1

Flutter: google founding choice

I'm using admob_consent, doing everything according to the instructions including step "Create respective messages inside Funding Choices for your desired app and publish them".
Deploying on android
after that code, nothing happens
_admobConsent.show(forceShow: true);
But I'm expecting to get consent dialog
debug console:
To fix this issue need to select "personalized ads" for EEA and UK users
https://apps.admob.com/v2/pubcontrols/eu-user-consent

How to define a list of emails for the job notification plugin in Jenkins

This is for the Notification Plugin (link here) for Jenkins.
I have a bunch of Jenkins jobs that I want to keep an eye on. I want to be alerted/emailed when any changes are made to a job so the job notification plugin should be helpful. This plugin adds a subsection to each Jenkins job for us to configure. We have to check the checkbox and enter email addresses for each job to notify us whenever there's a change.
I want to define some environment variable that contains emails so I don't have to go into each job to add/delete email addresses for interested parties; that I can just add/delete addresses from this variable. Can someone tell me how to do this or am I out of luck and the field only takes email addresses and not variables containing email addresses.
Screenshots from my Jenkins:
Global variables defined in Jenkins:
Field in Jenkins job notification heading that doesn't allow me to enter a variable for emails:
This appears to be fixed in version 2.144 (both "${DEFAULT_RECIPIENTS}" and "$DEFAULT_RECIPIENTS" reference the global property fine in the "Recipients" field).
Otherwise, I use the Email Extension Plugin ("Email-ext") for much more flexibility.
Once installed, to configure the plugin, navigate to Jenkins -> Manage Jenkins -> Configure System, and scroll down to "Extended E-mail Notification".
There you can set the global defaults, such as "Default Recipients".
These settings are assigned to tokens, such as "$DEFAULT_RECIPIENTS".
Click the "?" button for each setting and note the token name.
Note the "cc:" and "bcc:" prefixes to put an address on "cc" or "bcc").
Then, in your job configuration (/job/myJobName/configure):
Go to "Post-build Actions"
Click "Add post-build action" and select "Editable Email Notification".
Ensure that "$DEFAULT_RECIPIENTS" is in the "Project Recipient List", with any other addresses (note the "cc:" prefix to put addresses on "cc").
Click on the "Advanced settings" (bottom left of the "Editable Email Notification" configuration) to show the "Triggers" section and configure emails depending on the build status, like "Always", "Failure", etc...). Click the "Advanced" button for each trigger to get more options.
Once this setup is done, you can edit the global "$DEFAULT_RECIPIENTS" to change the emailing for all jobs configured as above, and have the functionality you require.
PS: I know this is old, I hope my answer may help others - like me - that have the same question.
I've been trying to follow a similar approach as that of yours, with the only difference of having a job parameter being assigned the recipient's address.
I encountered a problem where the plugin wasn't able to parse the job/environment variable to it's assigned value (the email address).
For example,
emailID=xxxxxx#yyyyy.com
Now this particular variable was being sent into the emailing list as ${emailID} and not as xxxxxxx#yyyyyy.com
The fix? Really funny.
Your variable must be the first comma seperated value in the mailing list.
You can refer to the attached image below.
As you can see, just keep the variable first, and then your predefined values or the plugin's variables

Where can I find the GitHub ID in my account?

What is the difference between GitHub username and GitHub ID? I was asked for my Github ID for a certain project and I happened to give my username. But the person is unable to find me on GitHub with my username. So I got a GitHub ID from the below URL:
http://caius.github.io/github_id/
But I'm unable to find this ID from my account directly. Where can I find this in my GitHub account? It would be great if someone could elaborate on this.
Thank You.
It can be easily retrieved using GitHub API:
https://api.github.com/users/your_github_user_name
where instead of your_github_user_name you must use the desired GitHub username.
Example:
https://api.github.com/users/github
It can be easily retrieved using Github API.
Example: https://api.github.com/users/username
It can be easily retrieved using Github API. If you cannot use the API answer or from http://caius.github.io/github_id/ you can go to github --> settings --> emails , under the Primary email address you will find {id}+{user_name}#users.noreply.github.com. The format is simillar to this: 50826640+hirwablessing#users.noreply.github.com, that 50826640 is the id.
From this answer
If you cannot use the API answer or from http://caius.github.io/github_id/ you can go to github --> settings --> emails, under the Primary email address you will find {id}+{user_name}#users.noreply.github.com.
This is at least true if you have Keep my email address private checked.
I have this text in the Keep my email address private explanation, and I'm guessing this will be there even if it is turned off.
Look for 'noreply' in the emails section.
If you do have the GitHub Id but need to find the username / login you can do it like this with the List users endpoint:
Subtract the id by 1 and run the following query. My GitHub Id is 4015237 and therefore the query parameter since receives the value 4015236.
https://api.github.com/users?since=4015236&per_page=1
https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#list-users
Description for since:
Query parameters - since - A user ID. Only return users with an ID
greater than this ID.
Don't use the ID stated in other answers I tried this and it didn't work and said it was invalid on AWS.
It's located on the main GIT repository. Those random letters and numbers are below the add file button with no description, obviously. Not only that but it's clickable if you click into it you'll find a much longer commit ID. You want the longer one.
Everyone loves completely unnecessary complexity in a platform!!
Step-1: Go to this link:
https://caius.github.io/github_id/
Step-2 Enter your Github username
You got it!
The second method is:
Go to your GitHub account and click on the Settings option.
Go to the emails section.
You id is listed there. The format is:
{id}+{user_name}#users.noreply.github.com