<?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>Android Archives - Creatronix</title>
	<atom:link href="https://creatronix.de/tag/android/feed/" rel="self" type="application/rss+xml" />
	<link>https://creatronix.de/tag/android/</link>
	<description>My adventures in code &#38; business</description>
	<lastBuildDate>Mon, 20 Oct 2025 06:57:29 +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 use ViewModel in Android</title>
		<link>https://creatronix.de/how-to-use-viewmodel/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Wed, 17 Nov 2021 14:35:43 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[activityViewModels]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[livedata]]></category>
		<category><![CDATA[observer]]></category>
		<category><![CDATA[viewmodel]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3871</guid>

					<description><![CDATA[<p>Dependencies dependencies { implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' ViewModel class and LiveData class PracticeProgressViewModel : ViewModel() { private val _text = MutableLiveData&#60;String&#62;().apply { value = "" } val text: MutableLiveData&#60;String&#62; = _text fun setText(value: String){ _text.value = value } } Fragment class PracticeProgressFragment : Fragment() { private val homeViewModel: PracticeProgressViewModel by activityViewModels() Observer Pattern override fun onCreateView( inflater:&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-use-viewmodel/">How to use ViewModel in Android</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Dependencies</h2>
<pre>dependencies {
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
</pre>
<h2>ViewModel class and LiveData</h2>
<p><span id="more-3871"></span></p>
<pre>class PracticeProgressViewModel : ViewModel() {
    
    private val _text = MutableLiveData&lt;String&gt;().apply {
        value = ""
    }

    val text: MutableLiveData&lt;String&gt; = _text

    fun setText(value: String){
        _text.value = value
    }
}</pre>
<h2>Fragment</h2>
<pre>class PracticeProgressFragment : Fragment() {

    private val <strong>homeViewModel</strong>: PracticeProgressViewModel by activityViewModels()
</pre>
<p>Observer Pattern</p>
<pre>    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {

        <strong>homeViewModel</strong>.text.observe(viewLifecycleOwner, {
            textView.text = it
        })
</pre>
<p>Update the ViewModel</p>
<pre>    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        val button = binding.button
        button.setOnClickListener(View.OnClickListener {
        
            val totalAmoint = practiceDao.getTotalAmount()
            <strong>homeViewModel</strong>.setText(totalAmoint.toString())
        })
    }

</pre>
<p>The post <a href="https://creatronix.de/how-to-use-viewmodel/">How to use ViewModel in Android</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What is the AOSP?</title>
		<link>https://creatronix.de/what-is-the-aosp/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Wed, 27 Oct 2021 12:33:32 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[aosp]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[repo]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3958</guid>

					<description><![CDATA[<p>AOSP is the Android Open Spurce Project Architecture Source Code is hosted here: https://android.googlesource.com/platform/manifest Google uses repo (basically a git wrapper written in python) to clone the source code. You can find the instructions here:  https://source.android.com/setup/build/downloading Further Reading What is Ninja? What is kapt? Anatomy of a Gradle file</p>
<p>The post <a href="https://creatronix.de/what-is-the-aosp/">What is the AOSP?</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>AOSP is the Android Open Spurce Project</p>
<h2>Architecture</h2>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3959" src="https://creatronix.de/wp-content/uploads/2021/10/aosp_architecture.png" alt="" width="618" height="727" srcset="https://creatronix.de/wp-content/uploads/2021/10/aosp_architecture.png 618w, https://creatronix.de/wp-content/uploads/2021/10/aosp_architecture-255x300.png 255w" sizes="(max-width: 618px) 100vw, 618px" /></p>
<h2>Source Code</h2>
<p>is hosted here: <a href="https://android.googlesource.com/platform/manifest">https://android.googlesource.com/platform/manifest</a></p>
<p>Google uses <a href="https://source.android.com/setup/develop#installing-repo">repo</a> (basically a git wrapper written in python) to clone the source code.</p>
<p>You can find the instructions here:  <a href="https://source.android.com/setup/build/downloading">https://source.android.com/setup/build/downloading</a></p>
<h2>Further Reading</h2>
<p><a href="https://creatronix.de/what-is-ninja/">What is Ninja?</a></p>
<p><a href="https://creatronix.de/what-is-kapt/">What is kapt?</a></p>
<p><a href="https://creatronix.de/anatomy-of-a-gradle-file/">Anatomy of a Gradle file</a></p>
<p>The post <a href="https://creatronix.de/what-is-the-aosp/">What is the AOSP?</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to use Snackbars</title>
		<link>https://creatronix.de/how-to-use-snackbars/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Tue, 26 Oct 2021 14:16:25 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Kotlin & Java]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[material desing]]></category>
		<category><![CDATA[snackbar]]></category>
		<category><![CDATA[toast]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3940</guid>

					<description><![CDATA[<p>A Snackbar is a replacement for Toasts in Android. Dependency implementation 'com.google.android.material:material:1.4.0' Layout A snackbar must be tied to a coordinator layout. If you use fragments the standard layout is FrameLayout which can be directly swapped with: &#60;androidx.coordinatorlayout.widget.CoordinatorLayout Snackbar val snackbar = Snackbar.make( binding.root, "No internet connection! Please enable WiFi or Mobile Data", Snackbar.LENGTH_INDEFINITE )&#8230;</p>
<p>The post <a href="https://creatronix.de/how-to-use-snackbars/">How to use Snackbars</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A Snackbar is a replacement for Toasts in Android.</p>
<h2>Dependency</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-groovy" data-lang="Groovy"><code>implementation 'com.google.android.material:material:1.4.0'</code></pre>
</div>
<h2>Layout</h2>
<p>A snackbar must be tied to a coordinator layout. If you use fragments the standard layout is FrameLayout which can be directly swapped with:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-xml" data-lang="XML"><code>&lt;androidx.coordinatorlayout.widget.CoordinatorLayout</code></pre>
</div>
<h2>Snackbar</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-kotlin" data-lang="Kotlin"><code>val snackbar = Snackbar.make( 
    binding.root, 
    "No internet connection! Please enable WiFi or Mobile Data", 
    Snackbar.LENGTH_INDEFINITE ) 
snackbar.show()</code></pre>
</div>
<h2>Further Reading</h2>
<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/dependency-injection-with-koin-and-kotlin-in-android/">Dependency Injection with Koin and Kotlin in Android</a></p>
<p><a href="https://creatronix.de/how-to-use-viewmodel/">How to use ViewModel in Android</a></p>
<p>The post <a href="https://creatronix.de/how-to-use-snackbars/">How to use Snackbars</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<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>
		<item>
		<title>Logging in Android with Timber</title>
		<link>https://creatronix.de/logging-in-android-with-timber/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Mon, 25 Oct 2021 09:13:03 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[logcat]]></category>
		<category><![CDATA[loggin]]></category>
		<category><![CDATA[timber]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3866</guid>

					<description><![CDATA[<p>In this article I show you how to use timber for logging in your Android App. Timber is built upon Android&#8217;s Log class. If you are not yet familiar with logging in Android have a look at Logging in Android Dependency Timber has just on dependency. Nice! dependencies { implementation 'com.jakewharton.timber:timber:5.0.1' } Initialization in Application&#8230;</p>
<p>The post <a href="https://creatronix.de/logging-in-android-with-timber/">Logging in Android with Timber</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this article I show you how to use timber for logging in your Android App.</p>
<p>Timber is built upon Android&#8217;s Log class. If you are not yet familiar with logging in Android have a look at <a href="https://creatronix.de/logging-in-android/">Logging in Android</a><span id="more-3866"></span></p>
<h2>Dependency</h2>
<p>Timber has just on dependency. Nice!</p>
<pre>dependencies {
  implementation <span class="pl-s"><span class="pl-pds">'</span>com.jakewharton.timber:timber:5.0.1<span class="pl-pds">'</span></span>
}</pre>
<h2>Initialization in Application</h2>
<p>To use Timber in your app you need an application class where you call the static method Timber.plant</p>
<pre>import android.app.Application
import timber.log.Timber

class LevelUpApplication : Application()  {
    override fun onCreate() {
        super.onCreate()
<span id="13d3" class="bx ma kb fp ls b bu mb mc s md" data-selectable-paragraph=""><strong class="ls jz">        if </strong>(BuildConfig.<em class="jc">DEBUG</em>) {
            Timber.plant(DebugTree())
        }
</span>    } 
}</pre>
<p>Make sure that your custom application class is referenced in your manifest:</p>
<pre>&lt;application
    android:name=".LevelUpApplication"
    ...
&gt;</pre>
<h2>Import &amp; Logging</h2>
<p>After you have added Timber Android Studio highlights the old log statements:</p>
<p><img decoding="async" class="alignnone size-full wp-image-3901" src="https://creatronix.de/wp-content/uploads/2021/10/timber.png" alt="" width="785" height="198" srcset="https://creatronix.de/wp-content/uploads/2021/10/timber.png 785w, https://creatronix.de/wp-content/uploads/2021/10/timber-300x76.png 300w, https://creatronix.de/wp-content/uploads/2021/10/timber-768x194.png 768w" sizes="(max-width: 785px) 100vw, 785px" /></p>
<p>Timber is imported via</p>
<pre>import timber.log.Timber</pre>
<p>And the new log statement looks like this:</p>
<pre>Timber.d("onCreate")</pre>
<p>The new log statement has no TAG element so you can remove the companion object from your class.</p>
<p><a href="https://github.com/JakeWharton/timber">Timber on github</a></p>
<p>The post <a href="https://creatronix.de/logging-in-android-with-timber/">Logging in Android with Timber</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Localization of Android Apps</title>
		<link>https://creatronix.de/localization-of-android-apps/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Thu, 23 Sep 2021 14:14:46 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[localization]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3690</guid>

					<description><![CDATA[<p>If you want to add another language for your app do the following Create a new folder e.g. app/src/main/res/values-de Add strings.xml into this folder Translate the content The cool thing about translation in android is that you can do it incrementally: when there is no translation for a string resource in a locale Android will&#8230;</p>
<p>The post <a href="https://creatronix.de/localization-of-android-apps/">Localization of Android Apps</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you want to add another language for your app do the following</p>
<ul>
<li>Create a new folder e.g. app/src/main/res/<strong>values-de</strong></li>
<li>Add strings.xml into this folder</li>
<li>Translate the content</li>
</ul>
<p>The cool thing about translation in android is that you can do it incrementally: when there is no translation for a string resource in a locale Android will automagically use the value from /res/<strong>values/strings.xml</strong></p>
<p>The post <a href="https://creatronix.de/localization-of-android-apps/">Localization of Android Apps</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Generating SHA-1 for Google API</title>
		<link>https://creatronix.de/generating-sha-1-for-google-api/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Thu, 06 May 2021 12:20:20 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[sha-1]]></category>
		<category><![CDATA[youtube]]></category>
		<guid isPermaLink="false">https://creatronix.de/?p=3605</guid>

					<description><![CDATA[<p>When you want to interface with any Google API e.g. YouTube from within your Android App, you need to register your app in the developer console. You have to provide a SHA-1 key which can be generated as following: Command line $ chmod u+x gradlew $ ./gradlew signingReport</p>
<p>The post <a href="https://creatronix.de/generating-sha-1-for-google-api/">Generating SHA-1 for Google API</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When you want to interface with any Google API e.g. YouTube from within your Android App, you need to register your app in the developer console.</p>
<p>You have to provide a SHA-1 key which can be generated as following:</p>
<h2>Command line</h2>
<pre>$ chmod u+x gradlew
$ ./gradlew signingReport</pre>
<p>The post <a href="https://creatronix.de/generating-sha-1-for-google-api/">Generating SHA-1 for Google API</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Passing data between AndroidActivities</title>
		<link>https://creatronix.de/passing-data-between-androidactivities/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Wed, 17 Jun 2020 14:29:21 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Kotlin & Java]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[extra]]></category>
		<category><![CDATA[intent]]></category>
		<category><![CDATA[kotlin]]></category>
		<guid isPermaLink="false">http://creatronix.de/?p=3341</guid>

					<description><![CDATA[<p>Sending data private void openVideoActivity(String video) { Intent newActivity = new Intent(this, PlayerActivity.class); newActivity.putExtra("videoId", video); startActivity(newActivity); } Retrieving data final String videoID = getIntent().getExtras().getString("videoID"); &#160; In Kotlin it looks like this: val intent = Intent(this, NewActivity::class.java).apply { putExtra("EXTRA_MESSAGE", "Test 123") } startActivity(intent) Retrieving val message = intent.getStringExtra("EXTRA_MESSAGE") Further Reading Passing data between fragments using SafeArgs&#8230;</p>
<p>The post <a href="https://creatronix.de/passing-data-between-androidactivities/">Passing data between AndroidActivities</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Sending data</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-java" data-lang="Java"><code>private void openVideoActivity(String video) {
    Intent newActivity = new Intent(this, PlayerActivity.class);
    newActivity.putExtra("videoId", video);
    startActivity(newActivity);
}</code></pre>
</div>
<h2>Retrieving data</h2>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-java" data-lang="Java"><code>final String videoID = getIntent().getExtras().getString("videoID");</code></pre>
</div>
<p>&nbsp;</p>
<p>In Kotlin it looks like this:</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-java" data-lang="Kotlin"><code>val intent = Intent(this, NewActivity::class.java).apply {
    putExtra("EXTRA_MESSAGE", "Test 123")
}
startActivity(intent)</code></pre>
</div>
<p>Retrieving</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-java" data-lang="Kotlin"><code>val message = intent.getStringExtra("EXTRA_MESSAGE")</code></pre>
</div>
<h2>Further Reading</h2>
<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/passing-data-between-androidactivities/">Passing data between AndroidActivities</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Features and Permissions in Android</title>
		<link>https://creatronix.de/features-permissions-in-android/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Tue, 28 May 2019 07:41:26 +0000</pubDate>
				<category><![CDATA[Android & iOS development]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[internet access]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[tls]]></category>
		<category><![CDATA[usesCleartextTraffic]]></category>
		<guid isPermaLink="false">http://creatronix.de/?p=2675</guid>

					<description><![CDATA[<p>Features and Permissions A permission is something an app is allowed to do 🙂 E.g. using the camera, reading location or accessing your contacts. &#60;uses-permission android:name="android.permission.CAMERA" /&#62; &#60;uses-feature android:name="android.hardware.camera" android:required="true" /&#62; Internet Access If your app uses e.g. web-APIs you need internet access. This can be achieved by adding android.permission.INTERNET to your manifest. In this&#8230;</p>
<p>The post <a href="https://creatronix.de/features-permissions-in-android/">Features and Permissions in Android</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Features and Permissions</h2>
<p>A permission is something an app is allowed to do 🙂</p>
<p>E.g. using the camera, reading location or accessing your contacts.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-html" data-lang="XML"><code>&lt;uses-permission android:name="android.permission.CAMERA" /&gt; 
&lt;uses-feature android:name="android.hardware.camera" android:required="true" /&gt;</code></pre>
</div>
<h2>Internet Access</h2>
<p>If your app uses e.g. web-APIs you need internet access. This can be achieved by adding android.permission.INTERNET to your manifest. In this case you need the uses-permission tag.</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-html" data-lang="XML"><code>&lt;manifest package="de.creatronix.sample_app" xmlns:android="http://schemas.android.com/apk/res/android"&gt; 
&lt;uses-permission android:name="android.permission.INTERNET"/&gt; 
&lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;</code></pre>
</div>
<p><code dir="ltr" translate="no"><a href="https://developer.android.com/reference/android/Manifest.permission#INTERNET">INTERNET</a></code></p>
<p>Allows applications to open network sockets.</p>
<p><code dir="ltr" translate="no"><a href="https://developer.android.com/reference/android/Manifest.permission#ACCESS_NETWORK_STATE">ACCESS_<wbr />NETWORK_<wbr />STATE</a></code></p>
<p>Allows applications to access information about networks.</p>
<h2>Non-TLS APIs</h2>
<p>When You have resources which do not use TLS (https but just http) you have to add</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-html" data-lang="XML"><code>&lt;application 
... 
android:usesCleartextTraffic="true"&gt; 
&lt;/application&gt;</code></pre>
</div>
<p>&nbsp;</p>
<p>Permissions in Services</p>
<p>Checking Permission</p>
<pre><span style="color: #004000;">import android.content.pm.PackageManager;
int uid = getCallingUid(); 
int pid = getCallingPid(); 
Log.d(LOGTAG, "Message from PID " + pid + " UID " + uid);
int perm = mContext.checkPermission("de.creatronix.my_service.MY_PERM", pid, uid); 
if (perm == PackageManager.PERMISSION_GRANTED) 
    Log.d(LOGTAG, "Granted"); 
else 
    Log.d(LOGTAG, "Denied");
</span></pre>
<p>Enforcing Permissions</p>
<pre><span style="color: #004000;">mContext.enforceCallingPermission("de.creatronix.my_service.MY_PERM", "echoString permission not granted"); </span></pre>
<p>More about permissions:<br />
<a href="https://developer.android.com/reference/android/Manifest.permission.html">https://developer.android.com/reference/android/Manifest.permission.html</a></p>
<p>The post <a href="https://creatronix.de/features-permissions-in-android/">Features and Permissions in Android</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Review Microsoft Lens</title>
		<link>https://creatronix.de/microsoft-lens/</link>
		
		<dc:creator><![CDATA[Jörn]]></dc:creator>
		<pubDate>Thu, 29 Dec 2016 00:13:51 +0000</pubDate>
				<category><![CDATA[Business & Management]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[lens]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[microsoft lens]]></category>
		<guid isPermaLink="false">http://creatronix.de/?p=255</guid>

					<description><![CDATA[<p>From time to time You need to take photos of documents, whiteboards or business cards. Microsoft Office Lens speeds up the process by enhancing the image in an automatic fashion. Recommended by my colleague Jens Dittmar this little helper improved my workday a lot. Let&#8217;s see it in action first: Documents Let&#8217;s say You have&#8230;</p>
<p>The post <a href="https://creatronix.de/microsoft-lens/">Review Microsoft Lens</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>From time to time You need to take photos of documents, whiteboards or business cards. Microsoft <del>Office</del> Lens speeds up the process by enhancing the image in an automatic fashion.</p>
<p>Recommended by my colleague <a href="https://jendit.blogspot.de/">Jens Dittmar</a> this little helper improved my workday a lot. Let&#8217;s see it in action first:</p>
<h2>Documents</h2>
<p>Let&#8217;s say You have a book cover like this:</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3834.jpg"><img decoding="async" class="size-full wp-image-259 aligncenter" src="https://creatronix.de/wp-content/uploads/2016/12/img_3834.jpg" alt="" width="2448" height="3264" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3834.jpg 2448w, https://creatronix.de/wp-content/uploads/2016/12/img_3834-225x300.jpg 225w, https://creatronix.de/wp-content/uploads/2016/12/img_3834-768x1024.jpg 768w" sizes="(max-width: 2448px) 100vw, 2448px" /></a></p>
<p>Now we take a photo of it with MS Office Lens. What the app does is detecting the edges of a document and highlights them like that:</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3833.jpg"><img decoding="async" class="size-full wp-image-257 aligncenter" src="https://creatronix.de/wp-content/uploads/2016/12/img_3833.jpg" alt="" width="640" height="1136" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3833.jpg 640w, https://creatronix.de/wp-content/uploads/2016/12/img_3833-169x300.jpg 169w, https://creatronix.de/wp-content/uploads/2016/12/img_3833-577x1024.jpg 577w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>If you now take the photo it automagically crops the image, rectifies the edges and improves the contrast. This is what you get without further adjustments:</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3835.jpg"><img decoding="async" class="size-full wp-image-258 aligncenter" src="https://creatronix.de/wp-content/uploads/2016/12/img_3835.jpg" alt="" width="1980" height="3198" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3835.jpg 1980w, https://creatronix.de/wp-content/uploads/2016/12/img_3835-186x300.jpg 186w, https://creatronix.de/wp-content/uploads/2016/12/img_3835-768x1240.jpg 768w, https://creatronix.de/wp-content/uploads/2016/12/img_3835-634x1024.jpg 634w" sizes="(max-width: 1980px) 100vw, 1980px" /></a></p>
<p>I&#8217;m not an expert in image processing but it seems like the app does some gamma correction, too.</p>
<p>I think the result is amazing when you consider that you don&#8217;t have to fumble with any settings so far!</p>
<h2>Whiteboard</h2>
<p>OK, another use case. You did some brainstorming on a whiteboard and want to send a picture to your colleagues. As You can see a conventional photo is a bit poor.</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3742.jpg"><img decoding="async" class="size-full wp-image-268 aligncenter" src="https://creatronix.de/wp-content/uploads/2016/12/img_3742.jpg" alt="" width="3264" height="2448" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3742.jpg 3264w, https://creatronix.de/wp-content/uploads/2016/12/img_3742-300x225.jpg 300w, https://creatronix.de/wp-content/uploads/2016/12/img_3742-768x576.jpg 768w, https://creatronix.de/wp-content/uploads/2016/12/img_3742-1024x768.jpg 1024w" sizes="(max-width: 3264px) 100vw, 3264px" /></a></p>
<p>This is the part where Office Lens comes in handy:</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3743.jpg"><br />
<img decoding="async" class="size-full wp-image-267 aligncenter" src="https://creatronix.de/wp-content/uploads/2016/12/img_3743.jpg" alt="" width="2659" height="1992" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3743.jpg 2659w, https://creatronix.de/wp-content/uploads/2016/12/img_3743-300x225.jpg 300w, https://creatronix.de/wp-content/uploads/2016/12/img_3743-768x575.jpg 768w, https://creatronix.de/wp-content/uploads/2016/12/img_3743-1024x767.jpg 1024w" sizes="(max-width: 2659px) 100vw, 2659px" /></a><span id="selectionBoundary_1482993778202_3174940485729353" class="rangySelectionBoundary" style="line-height: 0; display: none;"></span></p>
<p>The only drawback: it does not improve your handwriting 😉</p>
<h2>Business Cards</h2>
<p>I don&#8217;t get business cards very often but when I do I want to have a nice little photo of &#8217;em. (No meme intended 🙂 ) Does it work? Does it even work with black business cards?</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3836.jpg"><img decoding="async" class="size-full wp-image-270 aligncenter" src="https://creatronix.de/wp-content/uploads/2016/12/img_3836.jpg" alt="" width="1136" height="640" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3836.jpg 1136w, https://creatronix.de/wp-content/uploads/2016/12/img_3836-300x169.jpg 300w, https://creatronix.de/wp-content/uploads/2016/12/img_3836-768x433.jpg 768w, https://creatronix.de/wp-content/uploads/2016/12/img_3836-1024x577.jpg 1024w" sizes="(max-width: 1136px) 100vw, 1136px" /></a></p>
<p>Well, yes it does work. Again, the edges are detected and rectified, contrast and gamma improved. (The font does look like this intentionally 🙂 )</p>
<p><a href="https://creatronix.de/wp-content/uploads/2016/12/img_3837.jpg"><img decoding="async" class="alignnone size-full wp-image-271" src="https://creatronix.de/wp-content/uploads/2016/12/img_3837.jpg" alt="" width="1536" height="995" srcset="https://creatronix.de/wp-content/uploads/2016/12/img_3837.jpg 1536w, https://creatronix.de/wp-content/uploads/2016/12/img_3837-300x194.jpg 300w, https://creatronix.de/wp-content/uploads/2016/12/img_3837-768x498.jpg 768w, https://creatronix.de/wp-content/uploads/2016/12/img_3837-1024x663.jpg 1024w" sizes="(max-width: 1536px) 100vw, 1536px" /></a></p>
<h2>Bottom Line</h2>
<p>I really like this app because it does one thing and this one thing great! With this app there is definitely no need anymore to keep a scanner around.</p>
<p>You can get the app for free for <a href="https://itunes.apple.com/de/app/office-lens/id975925059?mt=8">iOS</a>, and <a href="https://play.google.com/store/apps/details?id=com.microsoft.office.officelens&amp;hl=de">Android</a></p>
<p>&nbsp;</p>
<p>The post <a href="https://creatronix.de/microsoft-lens/">Review Microsoft Lens</a> appeared first on <a href="https://creatronix.de">Creatronix</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
