<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ahmed Abd Elhak on Medium]]></title>
        <description><![CDATA[Stories by Ahmed Abd Elhak on Medium]]></description>
        <link>https://medium.com/@ah_abdelhak?source=rss-719b9651023b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Nhf7-lxKrbx1JwINNFn-gg.jpeg</url>
            <title>Stories by Ahmed Abd Elhak on Medium</title>
            <link>https://medium.com/@ah_abdelhak?source=rss-719b9651023b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:30:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ah_abdelhak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ The Future of AI Development: Supercharge Your App with n8n & AI Agents]]></title>
            <link>https://medium.com/@ah_abdelhak/the-future-of-ai-development-supercharge-your-app-with-n8n-ai-agents-477adb567bd6?source=rss-719b9651023b------2</link>
            <guid isPermaLink="false">https://medium.com/p/477adb567bd6</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ahmed Abd Elhak]]></dc:creator>
            <pubDate>Sat, 17 May 2025 11:46:01 GMT</pubDate>
            <atom:updated>2025-05-21T19:57:16.074Z</atom:updated>
            <content:encoded><![CDATA[<h3>with Real Use Cases &amp; a Full Case Study</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FOQYS3VBeokUahtXn_9aaA.png" /><figcaption>Supercharge Your App with n8n &amp; AI Agents</figcaption></figure><p>What if you could build smart app features, automate workflows, integrate AI, and skip writing backend code altogether?</p><p><strong>Welcome to the era of n8n + AI agents</strong> — the no-code/low-code revolution for developers.</p><h3>🔧 What is n8n?</h3><p><strong>n8n</strong> (short for <em>“Node to Node”</em>) is a <strong>powerful open-source workflow automation platform</strong> that allows you to visually connect apps, APIs, and logic — just like building blocks.</p><p>It’s self-hosted or cloud-based and supports over <strong>400+ integrations</strong>.</p><h3>🤖 <strong>Why Use n8n in Your Development Projects?</strong></h3><ul><li>✅ <strong>Trigger actions</strong> from in-app events (like form submits or user messages).</li><li>✅ <strong>Automate backend logic</strong> without writing server code.</li><li>✅ <strong>Connect easily</strong> to services like Airtable, Gmail, Slack, Stripe, etc.</li><li><strong>✅ Reduce infrastructure complexity</strong> and maintenance.</li></ul><h3>🧠 Why AI Agents?</h3><p><strong>AI agents</strong> like OpenAI’s GPT or Claude add brains to your workflows. They understand human language, summarize input, respond with empathy, and make decisions — all without you writing logic trees.</p><h3>🤝 <strong>Why Developers Should Care?</strong></h3><p>Whether you’re building mobile apps, web apps, or internal tools, using n8n and AI agents means:</p><ul><li>Smart chat experiences without backend servers.</li><li>️Visual workflow automation (no Firebase, no Node.js).</li><li>AI-powered personalization in minutes.</li><li>Plug-and-play APIs, 3rd parties (Telegram, Sheets, Email, etc.)</li></ul><h3>📱 Case Study: AI Support Chatbot for a Food Delivery App</h3><p>Let’s build a <strong>real AI-powered support chatbot</strong> inside an app using:</p><ul><li>Kotlin (Android) , Swift (IOS), Postman (Test).</li><li>n8n (Workflow logic + automation).</li><li>OpenAI (AI agent).</li><li>Gmail (Send emails).</li><li>Optional: Telegram, Google Sheets (logging), Slack.</li></ul><h3>🛠️ App Flow</h3><ol><li>User types a support message in the app.</li><li>Message sent from app to n8n webhook.</li><li>n8n sends it to OpenAI’s GPT for processing.</li><li>GPT responds with a helpful message.</li><li>n8n returns the response to the app.</li><li>The conversation is sent to the customer via email.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_sfnV2upK_6V0vtx40vfA.png" /><figcaption>AI Support Chatbot — n8n Workflow</figcaption></figure><h3>🔁 n8n Workflow Breakdown</h3><ul><li><strong>Webhook Node</strong> — Receives POST request from app (/webhook/support)</li><li><strong>IF Node</strong> — Optional validation (e.g., message not empty)</li><li><strong>Set Node</strong> — Prepares system prompt:<br>“You are a helpful support agent for a food delivery app. Be concise and polite.”</li><li><strong>OpenAI Node</strong> — Sends user message and system prompt to GPT model (gpt-3.5-turbo).</li><li><strong>Gmail Node</strong>: Send email copy of the conversation to the customer.</li><li><strong>Respond to Webhook Node</strong> — Sends GPT reply back to the app as JSON.</li></ul><h3>⚡ Set Up the nodes in n8n &amp; Import Json Flow</h3><ol><li>Create a new workflow</li><li>import the below json to the workflow.</li><li>Set method to POST.</li><li>Copy the URL to be used on the client side.</li><li>Create workflow, Run and Test.</li></ol><blockquote>Note : Replace <strong>YOUR_OPENAI_API_KEY</strong> with your open ai key.</blockquote><pre>{<br>  &quot;name&quot;: &quot;AI Support Chatbot - Food Delivery&quot;,<br>  &quot;nodes&quot;: [<br>    {<br>      &quot;id&quot;: &quot;Webhook_support&quot;,<br>      &quot;name&quot;: &quot;Webhook (support)&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.webhook&quot;,<br>      &quot;typeVersion&quot;: 1,<br>      &quot;position&quot;: [200, 300],<br>      &quot;parameters&quot;: {<br>        &quot;path&quot;: &quot;support&quot;,<br>        &quot;httpMethod&quot;: &quot;POST&quot;<br>      }<br>    },<br>    {<br>      &quot;id&quot;: &quot;If_Message_Exists&quot;,<br>      &quot;name&quot;: &quot;IF Message Exists&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.if&quot;,<br>      &quot;typeVersion&quot;: 1,<br>      &quot;position&quot;: [400, 300],<br>      &quot;parameters&quot;: {<br>        &quot;conditions&quot;: {<br>          &quot;string&quot;: [<br>            {<br>              &quot;value1&quot;: &quot;={{$json[\&quot;message\&quot;]}}&quot;,<br>              &quot;operation&quot;: &quot;notEmpty&quot;<br>            }<br>          ]<br>        }<br>      }<br>    },<br>    {<br>      &quot;id&quot;: &quot;Set_Prompt&quot;,<br>      &quot;name&quot;: &quot;Set Prompt&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.set&quot;,<br>      &quot;typeVersion&quot;: 1,<br>      &quot;position&quot;: [600, 300],<br>      &quot;parameters&quot;: {<br>        &quot;keepOnlySet&quot;: true,<br>        &quot;values&quot;: {<br>          &quot;string&quot;: [<br>            { &quot;name&quot;: &quot;systemPrompt&quot;, &quot;value&quot;: &quot;You are a helpful support agent for a food delivery app. Be concise and polite.&quot; },<br>            { &quot;name&quot;: &quot;userMessage&quot;, &quot;value&quot;: &quot;={{$json[\&quot;message\&quot;]}}&quot; },<br>            { &quot;name&quot;: &quot;userEmail&quot;, &quot;value&quot;: &quot;={{$json[\&quot;email\&quot;]}}&quot; }<br>          ]<br>        }<br>      }<br>    },<br>    {<br>      &quot;id&quot;: &quot;OpenAI_HTTP&quot;,<br>      &quot;name&quot;: &quot;OpenAI (HTTP)&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.httpRequest&quot;,<br>      &quot;typeVersion&quot;: 1,<br>      &quot;position&quot;: [800, 300],<br>      &quot;parameters&quot;: {<br>        &quot;requestMethod&quot;: &quot;POST&quot;,<br>        &quot;url&quot;: &quot;https://api.openai.com/v1/chat/completions&quot;,<br>        &quot;jsonParameters&quot;: true,<br>        &quot;authentication&quot;: &quot;predefinedCredentialType&quot;,<br>        &quot;httpHeaderAuth&quot;: {<br>          &quot;name&quot;: &quot;Authorization&quot;,<br>          &quot;value&quot;: &quot;Bearer YOUR_OPENAI_API_KEY&quot;<br>        },<br>        &quot;bodyParametersJson&quot;: {<br>          &quot;model&quot;: &quot;gpt-3.5-turbo&quot;,<br>          &quot;messages&quot;: [<br>            { &quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;You are a helpful support agent for a food delivery app. Be concise and polite.&quot; },<br>            { &quot;role&quot;: &quot;user&quot;, &quot;content&quot;: &quot;={{$json[\&quot;userMessage\&quot;]}}&quot; }<br>          ]<br>        }<br>      }<br>    },<br>    {<br>      &quot;id&quot;: &quot;Gmail_Send&quot;,<br>      &quot;name&quot;: &quot;Gmail - Send Email&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.gmail&quot;,<br>      &quot;typeVersion&quot;: 1,<br>      &quot;position&quot;: [1000, 200],<br>      &quot;parameters&quot;: {<br>        &quot;resource&quot;: &quot;message&quot;,<br>        &quot;to&quot;: &quot;={{$json[\&quot;userEmail\&quot;]}}&quot;,<br>        &quot;subject&quot;: &quot;Your Support Request - Food Delivery App&quot;,<br>        &quot;text&quot;: &quot;Hello,\n\nHere is a copy of your support conversation:\nMessage: {{$json[\&quot;userMessage\&quot;]}}\nResponse: {{$json[\&quot;choices\&quot;][0][\&quot;message\&quot;][\&quot;content\&quot;]}}\n\nBest,\nSupport Team&quot;<br>      }<br>    },<br>    {<br>      &quot;id&quot;: &quot;Return_Response&quot;,<br>      &quot;name&quot;: &quot;Extract Reply &amp; Return&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.function&quot;,<br>      &quot;typeVersion&quot;: 1,<br>      &quot;position&quot;: [1000, 400],<br>      &quot;parameters&quot;: {<br>        &quot;functionCode&quot;: &quot;return [{ json: { reply: $json.choices[0].message.content } }];&quot;<br>      }<br>    }<br>  ],<br>  &quot;connections&quot;: {<br>    &quot;Webhook (support)&quot;: {<br>      &quot;main&quot;: [<br>        [{ &quot;node&quot;: &quot;IF Message Exists&quot;, &quot;type&quot;: &quot;main&quot;, &quot;index&quot;: 0 }]<br>      ]<br>    },<br>    &quot;IF Message Exists&quot;: {<br>      &quot;main&quot;: [<br>        [{ &quot;node&quot;: &quot;Set Prompt&quot;, &quot;type&quot;: &quot;main&quot;, &quot;index&quot;: 0 }]<br>      ]<br>    },<br>    &quot;Set Prompt&quot;: {<br>      &quot;main&quot;: [<br>        [{ &quot;node&quot;: &quot;OpenAI (HTTP)&quot;, &quot;type&quot;: &quot;main&quot;, &quot;index&quot;: 0 }]<br>      ]<br>    },<br>    &quot;OpenAI (HTTP)&quot;: {<br>      &quot;main&quot;: [<br>        [{ &quot;node&quot;: &quot;Gmail - Send Email&quot;, &quot;type&quot;: &quot;main&quot;, &quot;index&quot;: 0 }],<br>        [{ &quot;node&quot;: &quot;Extract Reply &amp; Return&quot;, &quot;type&quot;: &quot;main&quot;, &quot;index&quot;: 0 }]<br>      ]<br>    }<br>  },<br>  &quot;active&quot;: false,<br>  &quot;settings&quot;: {},<br>  &quot;versionId&quot;: &quot;1&quot;<br>}</pre><h3>⚙️ Postman (Test)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PeyKfRxSbJfurYAjU5bMCQ.png" /><figcaption>Sample Response from Webhook &amp; GPT Test Flow</figcaption></figure><h3>📲 Android (Kotlin)</h3><pre>val jsonBody = JSONObject().apply {<br>    put(&quot;userId&quot;, &quot;u_123&quot;)<br>    put(&quot;message&quot;, &quot;I want to cancel my order.&quot;)<br>}<br>val body = jsonBody.toString().toRequestBody(&quot;application/json&quot;.toMediaType())<br>val request = Request.Builder()<br>    .url(https://medium.com/&quot;https://ahabdelhak2030.app.n8n.cloud/webhook-test/support&quot;)<br>    .post(body)<br>    .build()</pre><h3>🍎 iOS (Swift)</h3><pre>let url = URL(string: &quot;https://ahabdelhak2030.app.n8n.cloud/webhook-test/support&quot;)!<br>var request = URLRequest(url: url)<br>request.httpMethod = &quot;POST&quot;<br>request.setValue(&quot;application/json&quot;, forHTTPHeaderField: &quot;Content-Type&quot;)let json: [String: Any] = [<br>    &quot;userId&quot;: &quot;u_123&quot;,<br>    &quot;message&quot;: &quot;I want to cancel my order.&quot;<br>]<br>let jsonData = try? JSONSerialization.data(withJSONObject: json)<br>request.httpBody = jsonData<br>let task = URLSession.shared.dataTask(with: request) { data, response, error in<br>    if let data = data {<br>        print(String(data: data, encoding: .utf8)!)<br>    }<br>}<br>task.resume()</pre><h3>🎉 <strong>Congratulations!</strong></h3><p>You’ve just built a complete workflow using <strong>n8n + AI Agent.</strong></p><h4>📊 Bonus Nodes:</h4><ul><li><strong>Telegram/Slack Alert Node</strong>: Notify support team if refund is requested.</li><li><strong>Airtable Node</strong>: Add customer profile to a CRM.</li><li><strong>Google Sheets Node</strong> — Logs query, response, and user ID.</li><li><strong>FCM Node : </strong>Push notification.</li></ul><h3>⚡ <strong>Other Real Use Cases with n8n + Ai agents</strong></h3><h4>🔄 Booking Automation System</h4><ul><li>App collects booking data</li><li>n8n stores in Google Sheets</li><li>Sends confirmation via Email + Telegram</li><li>Returns reference to app</li></ul><h4>📊 Product Feedback Analyzer</h4><ul><li>App collects product reviews</li><li>n8n sends to GPT</li><li>GPT classifies sentiment</li><li>n8n logs results in Notion or Sheets</li><li>Triggers alert if negative sentiment.</li></ul><h3>🔒 Security Tips for n8n Integration</h3><ul><li>Secure your webhooks with a secret key or JWT.</li><li>Sanitize input in Set or IF nodes</li><li>Avoid logging PII directly — use IDs.</li></ul><h3>Conclusion</h3><p>Whether you’re a solo developer, working on side projects, POC, or rapidly validating startup ideas, <strong>n8n is a powerful backend alternative</strong>. It doesn’t replace complex systems — but it sure replaces a lot of boilerplate.</p><p>Next time you’re about to say:<br> <strong>“I need to build a backend for this.”</strong><br> Pause and ask instead:<br> <strong>“Can I launch this faster with n8n?”</strong></p><h3>🚀 Stay Tuned…</h3><h4>In the next articles, we’ll dive into:</h4><ul><li>Multi-step AI workflows.</li><li>Offline-capable AI agents that sync when online.</li><li>Generating and syncing personalized content.</li><li>Full-scale automation with authentication and error handling.</li></ul><h4>📲 Follow along for more advanced use cases, deeper AI agent flows, and low-code powered development POCs.</h4><h4>🔗 References:</h4><ul><li><a href="https://docs.n8n.io/workflows/create/">n8n Official Docs</a></li><li><a href="https://github.com/n8n-io/n8n">n8n GitHub Repository</a></li><li><a href="https://platform.openai.com/docs/assistants/overview">OpenAI Agents</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=477adb567bd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prevent Application Tampering with SafetyNet]]></title>
            <link>https://medium.com/@ah_abdelhak/prevent-application-tampering-with-safetynet-60f88ef65ee3?source=rss-719b9651023b------2</link>
            <guid isPermaLink="false">https://medium.com/p/60f88ef65ee3</guid>
            <dc:creator><![CDATA[Ahmed Abd Elhak]]></dc:creator>
            <pubDate>Sat, 15 Jan 2022 23:02:08 GMT</pubDate>
            <atom:updated>2022-01-15T23:02:08.520Z</atom:updated>
            <content:encoded><![CDATA[<h4>Protect your Service,Data, Revenue, brand and customers.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*qYv4ZfhUlMoWQWEW" /><figcaption>SafetyNet — created by securitymagazine-<a href="https://www.securitymagazine.com/">https://www.securitymagazine.com/</a></figcaption></figure><h3><strong>What Is Application <em>Tampering</em> ?</strong></h3><p><strong><em>Tampering</em></strong> is the process of changing a mobile app (either the compiled app or the running process) or its environment to affect its behavior. For example, an app might refuse to run on your rooted test device, making it impossible to run some of your tests. In such cases, you’ll want to alter the app’s behavior.</p><h3><strong>SafetyNet Overview</strong></h3><p><strong>SafetyNet</strong> is a simple and scalable solution from Google to verify device compatibility and security. For app developers having concerns about their application’s security, Google trusts its Android SafetyNet will be the right answer. With a strong emphasis on security, SafetyNet essentially protects the sensitive data within an application and helps preserve user trust as well as device integrity. SafetyNet is a part of Google Play Services and is independent of the device manufacturer.</p><p><strong>SafetyNet</strong> has the Capabilities to ensure different levels of security by checking for tampered gadgets, malicious URLs, fake users, and harmful apps.</p><h3>SafetyNet API types</h3><p>1-SafetyNet Attestation API</p><p>2-SafetyNet Safe Browsing API</p><p>3-SafetyNet reCAPTCHA API</p><p>4-SafetyNet Verify Apps API</p><p>We Will go with <strong>SafetyNet Attestation API</strong> in this article..</p><blockquote><strong>SafetyNet Attestation API</strong> : Checks whether the gadget the application is attempting to run on is tampered or potentially compromised. It compares the device’s profile with that of Google certified devices and verifies if the device or the software running on it is Android compatible.</blockquote><p>The following figure illustrates the SafetyNet Attestation protocol, which involves the following steps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*6cq8V0vQB5eITN8H.png" /><figcaption>figure 1 : SafetyNet Attestation protocol</figcaption></figure><ol><li>The mobile app (Requester) makes a call to the SafetyNet Attestation API (Collector).</li><li>The API (Collector) requests a signed response using its backend (Attester).</li><li>The backend (Attester) sends the response to Google Play services (Collector).</li><li>The signed response is returned to the mobile app (Requester).</li><li>The Requester forwards the signed response to a trusted application server (Verifier).</li><li>The server verifies the response, enforces the appropriate security policies and sends the result of the verification process back to Requester.</li></ol><h3>More about SafetyNet Attestation API</h3><p>The API determines the integrity issues on the device and compares the corresponding device profile against the whitelisted device models having Google-approved device profiles. The software backed and hardware-based device profile can be considered compatible only if it matches up with any of the approved profiles in the reference list. A device is considered as approved by Google if it passes the Android Compatibility Test Suite (CTS).</p><p>by comparing the device profile against the CTS standards</p><p>The Api Verifies the following :</p><ul><li>Whether the device is rooted or not.</li><li>Whether the device is monitored.</li><li>Whether the bootloader has been unlocked.</li><li>Whether the device has recognized hardware parameters.</li><li>Whether the software is Android compatible.</li><li>Whether the device is free form malicious apps.</li></ul><h3>SafetyNet Workflow</h3><p>To use SafetyNet, you need Google API Token, so let’s go to process of getting token:</p><ol><li>Go to <a href="https://console.developers.google.com/apis/library">https://console.developers.google.com/apis/library</a></li><li>Search for and select the Android Device Verification. The Android Device Verification API dashboard screen appears.</li><li>If the API isn’t already enabled, click Enable.</li><li>If the Create credentials button appears, click on it to generate an API key. Otherwise, click the All API credentials drop-down list, then select the API key that’s associated with your project that has enabled the Android Device Verification API.</li><li>In the sidebar on the left, click Credentials. Copy the API key that appears.</li></ol><p>Then, add the dependency on your gradle.</p><pre>implementation &#39;com.google.android.gms:play-services-safetynet:18.0.1&#39;</pre><h3>Check Google Services Availability</h3><p>You need to verify if the user has a compatible Google Play Service version running on the device. You can verify this doing the following:</p><pre><strong>if</strong>(GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context)== ConnectionResult.SUCCESS) {<br>  <em>// The SafetyNet Attestation API is available.</em><br>} <strong>else</strong> {<br>  <em>// Prompt user to update Google Play services.</em><br>}</pre><h3><em>Obtain Nonce</em></h3><p>Nonce is a term for a unique number that should’t be replicated. It’s recommended that you generate this on your server in a safe manner to avoid replications of requests using the same nonce.</p><p>If you want to locally make a test with a nonce, you can do so with the following:</p><pre><em>// Nonce generation example:</em><br><strong>val</strong> nonce = ByteArray(<strong>32</strong>)<br>SecureRandom().nextBytes(byteArray)</pre><h3>Requesting a SafetyNet attestation</h3><p>With your nonce generated, now use snippet to receive an attestation request response:</p><pre>SafetyNet.getClient(this).attest(nonce, API_KEY)<br>    .addOnSuccessListener(this) {<br>        // Indicates communication with the service was successful.<br>        // Use response.getJwsResult() to get the result data.<br>    }<br>    .addOnFailureListener(this) { e -&gt;<br>        // An error occurred while communicating with the service.<br>        if (e is ApiException) {<br>            // An error with the Google Play services API contains some<br>            // additional details.<br>            val apiException = e as ApiException<br><br>            // You can retrieve the status code using the<br>            // apiException.statusCode property.<br>        } else {<br>            // A different, unknown type of error occurred.<br>            Log.d(FragmentActivity.TAG, &quot;Error: &quot; + e.message)<br>        }<br>    }</pre><h3>Attestation Data</h3><pre>{<br>  &quot;timestampMs&quot;: 9860437986543,<br>  &quot;nonce&quot;: &quot;R2Rra24fVm5xa2Mg&quot;,<br>  &quot;apkPackageName&quot;: &quot;com.package.name.of.requesting.app&quot;,<br>  &quot;apkCertificateDigestSha256&quot;: [&quot;base64 encoded, SHA-256 hash of the certificate used to sign requesting app&quot;],<br>  &quot;ctsProfileMatch&quot;: true,<br>  &quot;basicIntegrity&quot;: true,<br>  &quot;evaluationType&quot;: &quot;BASIC&quot;,<br>}</pre><p>The payload response object will be like that after parsing:</p><pre><strong>data class</strong> SafetyNetResponse(<br>    <strong>val</strong> timestampMs: Long,<br>    <strong>val</strong> nonce: String,<br>    <strong>val</strong> apkPackageName: String,<br>    <strong>val</strong> apkCertificateDigestSha256: List&lt;String&gt;,<br>    <strong>val</strong> ctsProfileMatch: Boolean = <strong>false</strong>,<br>    <strong>val</strong> basicIntegrity: Boolean = <strong>false</strong>,<br><strong>    val</strong> evaluationType: String)</pre><p>This is a description of what each of the items on the SafetyNetResponse means:</p><ul><li><strong>timestampMs</strong>: Milliseconds past the UNIX epoch when the JWS response message was generated by Google’s servers.</li><li><strong>nonce</strong>: The single-use token that the calling app passes to the API.</li><li><strong>apkPackageName</strong>: The calling app’s package name.</li><li><strong>apkCertificateDigestSha256</strong>: Base-64 encoded representation(s) of the SHA-256 hash of the calling app’s signing certificate(s)</li><li><strong>ctsProfileMatch</strong>: A stricter verdict of device integrity. If the value of ctsProfileMatch is true, then the profile of the device running your app matches the profile of a device that has passed Android compatibility testing.</li><li><strong>basicIntegrity</strong>: A more lenient verdict of device integrity. If only the value of basicIntegrity is true, then the device running your app likely wasn’t tampered with. However, the device hasn’t necessarily passed Android compatibility testing.</li><li><strong>error</strong>: Encoded error information relevant to the current API request.</li><li><strong>advice</strong>: A suggestion for how to get a device back into a good state.</li></ul><h3><strong>Conclusion,</strong></h3><p>Always keep in your mind that security protects: Service, Revenue, brand and customer so keep improving the general security of your application and making it hard for malicious users to modify and distribute your app.</p><p>Thanks for reading, Keep your security, and stay tuned for more 😉</p><h3>References:</h3><ul><li><a href="https://developer.android.com/training/safetynet">https://developer.android.com/training/safetynet</a></li><li><a href="https://engineering.monstar-lab.com/en/post/2020/03/06/avoiding-tampering-on-android/">https://engineering.monstar-lab.com/en/post/2020/03/06/avoiding-tampering-on-android/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60f88ef65ee3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>