Home Blog Page 3840

High 3 Updates for Constructing Wonderful Apps at Google I/O ‘24



High 3 Updates for Constructing Wonderful Apps at Google I/O ‘24

Posted by Tram Bui, Developer Packages Engineer, Developer Relations

Google I/O 2024 was crammed with the most recent Android updates, equipping you with the information and instruments you must construct distinctive apps that delight customers and stand out from the group.

Listed below are our prime three bulletins for constructing glorious apps from Google I/O 2024:

#1: Enhancing Consumer Expertise with Android 15

Android 15 introduces a collection of enhancements aimed toward elevating the person expertise:

    • Edge-to-Edge Show: Reap the benefits of the default edge-to-edge expertise supplied by Android 15. Design interfaces that seamlessly lengthen to the perimeters of the display, optimizing display actual property and creating an immersive visible expertise for customers.
    • Predictive Again: Predictive again can improve navigation fluidity and intuitiveness. The system animations are not behind a Developer Possibility, which implies customers will be capable to see useful preview animations. Predictive again assist is on the market for each Compose and Views.

#2: Stylus Assist on Giant Screens

Android’s enhanced stylus assist brings thrilling capabilities:

    • Stylus Handwriting: Android now helps handwriting enter in textual content fields for each Views and Compose. Customers can seamlessly enter textual content utilizing their stylus with out having to change enter strategies, which might provide a extra pure and intuitive writing expertise.
    • Lowered Stylus Latency: To boost the responsiveness of stylus interactions, Android introduces two new APIs designed to decrease stylus latency. Android builders have seen nice success with our low latency libraries, with Infinite Painter reaching a 5x discount in latency from from 60-90 ms all the way down to 8-16 ms.

#3: Put on OS 5: Watch Face Format, Conservation, and Efficiency

Within the realm of Put on OS, we’re targeted on energy conservation and efficiency enhancements:

    • Enhanced Watch Face Format: We have launched enhancements to the Watch Face Format, making it simpler for builders to customise and optimize watch faces. These enhancements can allow the creation of extra responsive, visually interesting watch faces that delight customers.
    • Energy Conservation: Put on OS 5 prioritizes energy effectivity and battery conservation. Now out there in developer preview together with a brand new emulator, you possibly can leverage these enhancements to create Put on OS apps that ship distinctive battery life with out compromising performance.

There you may have it— the highest updates from Google I/O 2024 that will help you construct glorious apps. Excited to discover extra? Take a look at the complete playlist for deeper insights into these bulletins and different thrilling updates unveiled at Google I/O.


.NET 6 Sizzling Reload and "Refused to hook up with ws: as a result of it violates the Content material Safety Coverage directive" as a result of Net Sockets


In the event you’re enthusiastic about Sizzling Reload like me AND you additionally need an “A” grade from SecurityHeaders.com (actually, go do that now) then you’ll be taught in a short time about Content material-Safety-Coverage headers. You want to spend a while studying and you could find yourself with a considerably subtle listing of allowed issues, scripts, stylesheets, and so forth.

In DasBlog Core (the cross platform weblog engine that runs this weblog) Mark Downie makes these configurable and makes use of the NWebSpec ASP.NET Middleware library so as to add the wanted headers.

if (SecurityStyleSources != null && SecurityScriptSources != null && DefaultSources != null)

{
app.UseCsp(choices => choices
.DefaultSources(s => s.Self()
.CustomSources(DefaultSources)
)
.StyleSources(s => s.Self()
.CustomSources(SecurityStyleSources)
.UnsafeInline()
)
.ScriptSources(s => s.Self()
.CustomSources(SecurityScriptSources)
.UnsafeInline()
.UnsafeEval()
)
);
}

Every of these variables comes out of a config file. Sure, it could be extra safety in the event that they got here out of a vault or have been even laborious coded.

DasBlog is a pretty big and funky app and we observed instantly upon Mark upgrading it to .NET 6 that we have been unable to make use of Sizzling Reload (through dotnet watch or from VS 2022). We will complain about it, or we are able to find out about the way it works and why it is not working for us!

Bear in mind: Nothing in your laptop is hidden from you.

Beginning with a easy “View Supply” we are able to see a JavaScript embody on the very backside that’s undoubtedly not mine!

<script src="https://www.hanselman.com/_framework/aspnetcore-browser-refresh.js"></script>

Okay, this is smart as we all know not solely does HotReload help C# (code behinds) but additionally Markup through Razor Pages and altering CSS! It will undoubtedly want to speak “again house” to the runner which is both “dotnet watch” or VS2022.

If I modify the ASPNETCORE_ENVIRONMENT to “Manufacturing” (both through launch.json, launchsettings, or an setting variable like this, I can see that additional HotReload helper script is not there:

C:githubwshotreloadtest>dotnet run --environment="Manufacturing"

Constructing...
data: Microsoft.Internet hosting.Lifetime[14]
Now listening on: https://localhost:7216
data: Microsoft.Internet hosting.Lifetime[14]
Now listening on: http://localhost:5216

Bear in mind: You by no means need to use dotnet run in manufacturing! It is an SDK constructing command! You will need to use dotnet exec your.dll, dotnet your.dll, or better of all, in .NET 6 simply name the EXE straight! .binDebugnet6.0wshotreloadtest.exe in my instance. Why? dotnet run will all the time assume it is in Growth (you actually inform it to revive, construct, and exec in a single run command) should you run it. You will be aware that working the precise EXE is all the time WAY sooner as nicely! Do not ship your .NET SDK to your webserver and do not recompile the entire thing on startup in manufacturing!

We will see that that aspnnetcore-browser-refresh.js is the shopper aspect of Growth-time HotReload. Taking a look at our browser console we see :

.NET 6 Sizzling Reload and "Refused to hook up with ws: as a result of it violates the Content material Safety Coverage directive" as a result of Net Sockets

Refused to hook up with 'wss://localhost:62486/' 

as a result of it violates the next Content material Safety Coverage
directive: "default-src 'self'".
Notice that 'connect-src' was not explicitly set,
so 'default-src' is used as a fallback.

That is rather a lot to consider. I began out my ASP.NET Net App’s center ware saying it was OK to speak “again to myself” however nowhere else.

app.UseCsp(choices => choices.DefaultSources(s => s.Self())); 

Hm, self appears cheap, why cannot the browser join BACK to the dotnet run’ed Kestrel Net Server? It is all localhost, proper? Nicely, particularly it is http://localhost not ws://localhost, and even wss://localhost (that additional s is for safe) so I must explicitly permit ws: or wss: or each, however solely in Growth.

Possibly like this (once more, I am utilizing NWebSpec, however these are simply HTTP Headers so you may actually simply add them if you’d like, hardcoded.)

app.UseCsp(choices => choices.DefaultSources(s => s.Self())

.ConnectSources(s => s.CustomSources("wss://localhost:62895")));

However port numbers change, proper? Let’s do exactly wss:, solely in Growth. Now, if I am utilizing each CSPs and WebSockets (ws:, wss:) in Manufacturing, I will should be intentional about this.

What is the ethical?

In the event you begin utilizing CSP Headers to tighten issues up, be acutely aware and conscious of the headers you want for conveniences like Sizzling Reload in Growth versus no matter issues you could want in Manufacturing.

Hope this helps prevent a while!


Sponsor: At Rocket Mortgage® the work you do round right here will probably be 100% impactful however received’t take all of your free time, providing you with the right work-life stability. Or as we name it, tech/life stability! Be taught extra.


© 2021 Scott Hanselman. All rights reserved.

    

How Can I Make the Final Advertising and marketing Technique Utilizing AI?


Are you feeling overwhelmed by buyer inquiries? Are your brokers struggling to offer constant responses? Does cross-channel communication really feel out of attain?

New supply robotic hundreds up within the grocery store aisle, then rolls to you

0


Vayu Robotics has as we speak unveiled its first supply robotic. The One can observe workers round shops to load up buyer orders, earlier than autonomously navigating metropolis streets at speeds as much as 20 mph to ship the products. Industrial deployment has begun.

We have seen a bunch of supply robots trundle round campuses and neighborhoods through the years, with firms like Amazon, Fed-Ex, Walmart, Uber Eats and others all making an attempt out totally different options. A Californian startup is rolling down a considerably totally different path, with an autonomous bot that makes use of a brand new low-cost imaginative and prescient system plus AI coaching to navigate with out pre-mapping the route, and does away with expensive sensor suites besides.

Vayu Robotics was based in 2021 by “engineers, technologists and enterprise leaders with many years of trade expertise creating and commercializing cutting-edge automotive sensing, autonomous automobiles and robotics know-how.”

The crew launched a newly developed digicam sensor in 2022, geared toward permitting its autonomous supply bots to roll with out LiDAR sensors. Vayu Sense “combines dense, low-cost CMOS picture sensors with trendy computational imaging and machine studying methods.” The corporate claims that this proprietary know-how not solely outperforms typical RGB cameras however LiDAR too, leading to a cheap high-resolution robotic imaginative and prescient system with high-res depth notion, object detection and the power to work successfully in difficult circumstances.

The One delivery robot can travel on roads and bike paths up to 20 mph
The One supply robotic can journey on roads and bike paths as much as 20 mph

Vayu Robotics

This was adopted by a proprietary basis AI mannequin for robotics autonomy known as the Vayu Drive that is skilled utilizing each simulated and real-world knowledge, and negates the necessity for HD maps, localization know-how or LiDAR – counting on the Sense imaginative and prescient system as an alternative.

“It’s an end-to-end neural community, much like LLMs in that it operates on a tokens in and tokens out foundation,” defined the corporate. “The enter is multimodal – picture tokens from the cameras, instruction tokens for the instruction that the robotic has been advised to carry out, route tokens to indicate it the road-level navigation path.

“In another way from different LLMs, it has a notion of ‘state’ that’s built-up over time and is up to date with each further enter body that’s acquired. This enables for giant context home windows with out the standard slow-down that occurs with massive contexts. It’s designed to run effectively on the sting at 10 frames per second.”

Vayu Robotics emerged from stealth in October final 12 months with US$12.7 million in seed funding from backers together with Lockheed Martin, and has now introduced the launch of its first supply robotic. The One is designed to roll on roads in addition to bike lanes, sidewalks and inside shops, which – when mixed with the usage of AI basis fashions and low-cost passive sensors – is claimed to be a world first.

The four-wheeled electrical supply pod stands 3.3 ft tall (1 m), is 5.9 ft (1.8 m) in size and measures 2.2 ft (0.67 m) in width – so it should not current an excessive amount of of an impediment to different site visitors because it heads to clients at as much as 20 mph (32 km/h). The utmost per-charge vary of its battery pack is reported to be between 60 and 70 miles (as much as 112.6 km).

The One uses a proprietary vision system and a foundation AI model to navigate city streets
The One makes use of a proprietary imaginative and prescient system and a basis AI mannequin to navigate metropolis streets

Vayu Robotics

As soon as it arrives at its drop-off level, it could mount the sidewalk or driveway, come to a cease, open its facet door and take away the allotted bundle with its robotic arm. It may stow as much as 100 lb (45 kg) of products inside its storage compartment, although with some tweaking that would improve to 200 lb, says the corporate.

The One is at present being examined by an as-yet-unnamed “massive e-commerce participant” that plans to deploy 2,500 robots, beginning in San Ramon, California, forward of enlargement to different cities within the US. Different business clients are anticipated to hitch this system, however Vayu can be trying to have its applied sciences utilized in different robotic purposes – and is at present working with a “main international robotics producer” to swap out LiDAR sensors for Vayu sensing tech.

“Our software program is robotic type issue agnostic and we’ve already deployed it throughout a number of wheeled type elements. Within the close to future, Vayu’s software program know-how will allow the motion of quadrupedal and bipedal robots, permitting us to broaden into these markets as nicely,” revealed firm co-founder, Anand Gopalan. The video beneath has extra.

Supply: Vayu Robotics



What Kayakers Can Do To Struggle Local weather Change? Paddling In direction of a Greener Future








I used to be paddling down a river not too long ago, the solar glistening on the water, the rhythmic sound of my paddle breaking the floor. However whereas gliding alongside it struck me simply how a lot water ranges are decrease than typical, and the as soon as vibrant aquatic life appears sparse. 

This isn’t only a one-off; it’s a glimpse into the long run if we don’t deal with local weather change. And rivers, are only one facet of our surroundings impacted, albeit going through the brunt of our altering local weather. From harmful floods threatening communities to droughts placing livelihoods in danger, our waterways are the frontline of this world disaster.

Out of doors Fanatics in Local weather Motion

As kayakers, we have now a singular connection to water. We see firsthand the fantastic thing about our rivers and lakes and the threats they face. 

However we should always see ourselves as greater than witnesses; we’re additionally stewards. Our love for nature provides us a duty to guard these valuable ecosystems and combat for a sustainable future.

The Intersection of Kayaking and Local weather Change

The Vulnerability of Water Our bodies

Sea Level Rise

Temperature Rise: Hotter temperatures don’t simply imply a warmer summer season day; they’ve profound impacts on our water ecosystems. Elevated water temperatures can result in deadly circumstances for aquatic species. And it’s not simply in regards to the fish; hotter waters may cause poisonous algae outbreaks, contaminating our water provide and posing well being dangers to each people and animals.

Professional Tip: In case you spot an uncommon quantity of algae whereas kayaking, it’s finest to keep away from contact and inform native authorities. These blooms might be dangerous!

Rising Sea Ranges: For these of us who love coastal paddling, rising sea ranges are a looming concern. Not solely does it reshape our favourite paddling spots, but it surely additionally threatens coastal habitats and communities. As sea ranges rise, we would discover a few of our beloved kayaking areas turning into inaccessible or drastically altered.

Air pollution and Water High quality

Plastic-Pollution

Plastic Air pollution: We’ve all seen it – a plastic bottle floating by or a discarded bag tangled within the reeds. Plastic air pollution isn’t just an eyesore; it’s a menace to our waterways’ well being and the creatures that decision them dwelling. As kayakers, we’re in a major place to witness the extent of this subject.

Chemical Runoff: After heavy rain, have you ever ever seen the water trying a bit murkier? That’s usually attributable to stormwater runoff, which might carry pollution from roads, farms, and concrete areas into our rivers and lakes. This polluted runoff can hurt aquatic life and degrade water high quality, making our paddling experiences much less fulfilling and extra dangerous.

Steps Kayakers Can Take

Minimizing Carbon Footprint

Eco Friendly Kayak

Selecting Eco-Pleasant Gear: Subsequent time you’re available in the market for brand new gear, think about going inexperienced! Many firms now provide eco-friendly kayaking tools, from paddles manufactured from sustainable supplies to biodegradable equipment. Making this change not solely reduces your carbon footprint but in addition helps companies that prioritize our planet.

Lowering Transportation Emissions: Carpooling to your subsequent kayaking journey or selecting paddling spots nearer to dwelling can considerably cut back transportation emissions. Plus, it’s a good way to bond with fellow kayakers and uncover hidden gems in your native space!

Advocacy and Schooling

Elevating Consciousness: We’re a neighborhood, and there’s energy in numbers. By sharing details about local weather change and its influence on our favourite waterways, we are able to encourage extra kayakers to take motion. Whether or not it’s by way of social media, native golf equipment, or simply chatting with a pal on a paddling journey, each dialog counts.

Supporting Local weather-Centered Organizations: Organizations like American Rivers are on the forefront of defending our waterways and combating local weather change. By supporting their efforts, both by way of donations or volunteering, we are able to amplify our influence and guarantee a brighter future for our rivers.

Clear-Up Initiatives

Kayaking Cleaning Up River

Organizing Waterway Clear-Up Occasions: Why not flip your subsequent kayaking journey right into a clean-up occasion? Collect some mates, seize some trash baggage, and make a day of it! Not solely will you be serving to the atmosphere, however you’ll additionally really feel a deep sense of accomplishment as you paddle by way of cleaner waters.

Professional Tip: Use a mesh bag whereas gathering trash throughout your clean-up. It permits water to empty out, making it simpler to hold!

Correct Disposal of Waste: Keep in mind, what we usher in, we should take out. At all times pack out your trash and make sure you’re disposing of waste correctly. It’s a small step that makes an enormous distinction.

Sustainable Kayaking Practices

Depart No Hint Rules

Campsite Etiquette: When establishing camp after an extended day of paddling, it’s important to be conscious of our environment. At all times camp on current trails and campsites. In case you’re off the crushed path, select sturdy surfaces like rock, sand, or dry grass. Keep in mind, an excellent campsite is discovered, not made. And all the time preserve a distance from water sources to guard shorelines.

Enjoyable Reality: Do you know that tenting greater than 60 meters away from lakes and streams helps shield delicate aquatic ecosystems?

Waste Disposal: We’ve all heard the saying, “Pack it in, pack it out.” Nevertheless it’s greater than only a catchy phrase; it’s a duty. Make sure you carry again all of the waste you carried in. And when nature calls, deposit human waste in a gap dug no less than 60 meters away from water sources, trails, and campsites. And should you’re washing dishes or taking a fast bathtub, do it away from waterways and use biodegradable cleaning soap sparingly.

Participating with Native Communities

Constructing Partnerships

Collaborating with Environmental Teams: As kayakers, we have now a singular perspective on the well being of our waterways. Partnering with environmental teams can amplify our efforts to guard these valuable sources. By sharing our observations and experiences, we are able to present priceless insights and help their conservation initiatives.

Involving Native Faculties and Youth: The way forward for our planet lies within the palms of the subsequent technology. Participating with native colleges and youth teams can encourage younger minds to change into stewards of the atmosphere. Set up kayaking journeys, train them in regards to the Depart No Hint rules, and share the fun of paddling whereas emphasizing the significance of sustainable practices.

Selling Sustainable Tourism

Supporting Native Companies: When planning your subsequent kayaking journey, think about supporting native companies. Whether or not it’s renting tools, shopping for provides, or eating out, selecting native not solely boosts the neighborhood’s economic system but in addition reduces the carbon footprint related to transporting items lengthy distances.

Encouraging Accountable Tourism Practices: As we discover new locations, it’s essential to respect the atmosphere and native communities. Advocate for accountable tourism practices amongst fellow kayakers. This contains minimizing waste, respecting native customs and traditions, and avoiding delicate areas throughout breeding or nesting seasons.

Professional Tip: When sharing your adventures on social media, promote sustainable practices. Your posts can encourage others to comply with in your eco-friendly footsteps!

Private Way of life Selections

Lowering Plastic Consumption

Utilizing Reusable Bottles and Containers: Single-use plastics are a major menace to our waterways. As kayakers, we are able to lead by instance by utilizing reusable water bottles and containers. Not solely does this cut back plastic waste, but it surely additionally ensures we’re consuming clear, secure water throughout our journeys.

Single-Use Plastics: Past water bottles, think about all the opposite single-use plastics you would possibly carry on a visit. Can they get replaced with sustainable options? From reusable snack baggage to beeswax wraps, there are many eco-friendly choices accessible.

Vitality Effectivity

Sustainable Transportation Choices: Whereas kayaking is a low-impact exercise, attending to our launch factors usually includes driving. Contemplate carpooling with fellow paddlers, utilizing public transportation, and even biking to cut back your carbon footprint.

Dwelling Vitality Consumption: Our combat towards local weather change isn’t restricted to our time on the water. At dwelling, easy adjustments like switching to energy-efficient home equipment, utilizing LED bulbs, and unplugging gadgets when not in use could make a major distinction.

FAQ

Why is kayaking uniquely positioned to deal with local weather change?

Kayaking gives a direct connection to water ecosystems, making kayakers firsthand witnesses to the impacts of local weather change on these environments. This intimate relationship with nature fosters a way of duty and urgency to behave. Furthermore, the kayaking neighborhood, being passionate in regards to the open air, can function influential advocates for environmental safety and sustainable practices.

How can I get entangled in waterway clean-up occasions if I’m new to kayaking?

Many native environmental and kayaking teams set up clean-up occasions that welcome each seasoned kayakers and freshmen. Becoming a member of an area kayaking membership or following environmental organizations on social media can preserve you knowledgeable about upcoming occasions. Moreover, think about beginning your personal clean-up initiative with mates or household – each effort counts!

Are there certifications or programs I can take to change into a extra eco-conscious kayaker?

Completely! There are a number of organizations that provide programs on Depart No Hint rules, sustainable out of doors recreation, and wildlife safety. These programs not solely improve your kayaking expertise but in addition equip you with the data to attenuate your environmental influence and educate others.

What are some eco-friendly kayaking gear manufacturers?

The marketplace for sustainable out of doors gear is rising quickly. Manufacturers like Eddyline, Aqua-Certain, and NRS have made commitments to sustainability, providing merchandise created from recycled supplies or adopting eco-friendly manufacturing processes. At all times analysis and help manufacturers that prioritize the atmosphere.

Conclusion

Our planet’s well being is intricately tied to our actions, each large and small. As kayakers, we’re granted a singular perspective on the fantastic thing about our waterways and the threats they face. 

By embracing sustainable practices, participating with communities, and making knowledgeable selections, we are able to paddle in direction of a future the place our waters stay pristine and our planet thrives. Let’s not simply journey the waves of change however be the drive that drives them.