<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>startactivity Archives - Creatronix</title>
	<atom:link href="https://creatronix.de/tag/startactivity/feed/" rel="self" type="application/rss+xml" />
	<link>https://creatronix.de/tag/startactivity/</link>
	<description>My adventures in code &#38; business</description>
	<lastBuildDate>Sat, 17 Dec 2022 09:42:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>How to open a URL in a browser from your Android app</title>
		<link>https://creatronix.de/how-to-open-a-url-in-a-browser-from-your-android-app/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Tue, 26 Oct 2021 11:32:15 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[intent]]></category>
		<category><![CDATA[startactivity]]></category>
		<category><![CDATA[URL]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3937</guid>

					<description><![CDATA[<p>Motivation Sometimes you want to redirect the user from your app to the website for e.g. imprint and data protection info. So it can be helpful to open up a website directly from your app. Implementation In Switch between activities you learned that the standard way of switching between activities is an intent. The same&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-open-a-url-in-a-browser-from-your-android-app/">How to open a URL in a browser from your Android app</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>Sometimes you want to redirect the user from your app to the website for e.g. imprint and data protection info.</p>
<p>So it can be helpful to open up a website directly from your app.</p>
<h2>Implementation</h2>
<p>In <a href="https://creatronix.de/switch-between-activities/">Switch between activities</a> you learned that the standard way of switching between activities is an intent.</p>
<p>The same goes for open up the browser on your phone. The intent is called the &#8220;<code>ACTION_VIEW</code>&#8221;</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-java" data-lang="Kotlin"><code>import android.content.Intent
import android.net.Uri
val browserIntent = Intent(Intent.ACTION_VIEW)
browserIntent.data = Uri.parse("https://prestissimo-guitar.com/")
startActivity(browserIntent)</code></pre>
</div>
<h2>Further Reading</h2>
<p><a href="https://creatronix.de/passing-data-between-androidactivities/">Passing data between AndroidActivities</a></p>
<p><a href="https://creatronix.de/passing-data-between-fragments-using-safeargs/">Passing data between fragments using SafeArgs</a></p>
<p><a href="https://creatronix.de/pass-custom-objects-via-safeargs/">Pass custom objects via SafeArgs</a></p>
<p>The post <a href="https://creatronix.de/how-to-open-a-url-in-a-browser-from-your-android-app/">How to open a URL in a browser from your Android app</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
