<?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"><channel><title><![CDATA[Developer Trip Adventure]]></title><description><![CDATA[mobile, web trip]]></description><link>https://blogdevtrip.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1614397029420/EvFOouPto.png</url><title>Developer Trip Adventure</title><link>https://blogdevtrip.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Nov 2026 23:03:37 GMT</lastBuildDate><atom:link href="https://blogdevtrip.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Disabling Screenshots in Android Apps
security feature in app]]></title><description><![CDATA[In mobile app development, especially for apps handling sensitive information like banking apps, security is a top priority. One essential feature…]]></description><link>https://blogdevtrip.hashnode.dev/disabling-screenshots-in-android-apps-security-feature-in-app</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/disabling-screenshots-in-android-apps-security-feature-in-app</guid><category><![CDATA[Security]]></category><category><![CDATA[Android]]></category><category><![CDATA[android app development]]></category><category><![CDATA[Android Studio]]></category><category><![CDATA[android apps]]></category><category><![CDATA[Screenshot]]></category><category><![CDATA[banking]]></category><category><![CDATA[pentesting]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Thu, 28 Nov 2024 14:01:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/CB4z0uTFSYg/upload/036f54c5ea740ec075d41c493367a341.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In mobile app development, especially for apps handling sensitive information like <strong>banking apps</strong>, security is a top priority. One essential feature developers often implement is <strong>disabling screenshots</strong>, which ensures users cannot capture or share critical content, thereby protecting sensitive data such as credentials, financial balances, or personal information.</p>
<h2 id="heading-previous-knowledge"><strong>Previous Knowledge</strong></h2>
<p>To implement screenshot prevention, developers should be familiar with:</p>
<ul>
<li><p>Android's <code>WindowManager.LayoutParams</code> class.</p>
</li>
<li><p>The <code>FLAG_SECURE</code> flag, which is part of Android’s security framework to protect UI elements.</p>
</li>
<li><p>Basic Android lifecycle methods (e.g., <code>onCreate</code>).</p>
</li>
</ul>
<h2 id="heading-when-to-use"><strong>When to Use</strong></h2>
<p>You should consider disabling screenshots in apps where:</p>
<ol>
<li><p><strong>Sensitive Data is Displayed:</strong> Apps showing financial transactions, personal medical records, or private messages.</p>
</li>
<li><p><strong>Compliance is Required:</strong> Industries like banking, healthcare, or legal services require strict adherence to privacy standards.</p>
</li>
<li><p><strong>Security is Critical:</strong> Apps needing to protect confidential or proprietary information from being shared unintentionally or maliciously.</p>
</li>
</ol>
<h2 id="heading-why-to-use"><strong>Why to Use</strong></h2>
<ol>
<li><p><strong>Prevent Information Leaks:</strong> Screenshots can be shared easily, putting confidential data at risk.</p>
</li>
<li><p><strong>Enhance Malware Protection:</strong> Some malware is designed to capture screenshots without user consent.</p>
</li>
<li><p><strong>Build User Trust:</strong> Disabling screenshots demonstrates a commitment to safeguarding users' sensitive data.</p>
</li>
<li><p><strong>Regulatory Compliance:</strong> Many regulations (e.g., GDPR, HIPAA) mandate protecting sensitive information, and disabling screenshots is a proactive measure.</p>
</li>
</ol>
<h2 id="heading-solution">Solution</h2>
<p>To disable screenshots in Android apps, you can use the <strong>FLAG_SECURE</strong> property within the activity’s window settings. This prevents both screenshots and screen recordings.</p>
<p><code>override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // Prevent screenshots and screen recordings window.setFlags( WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE ) setContentView(R.layout.activity_main) }</code></p>
<p><em>Consider this only for release build variant. When we are working on a debug mode it could be enabled for sharing any issue that ocurre in your app</em></p>
<h2 id="heading-limitations-and-considerations"><strong>Limitations and Considerations</strong></h2>
<p>While <strong>FLAG_SECURE</strong> is effective in blocking screenshots and screen recordings, it does have limitations:</p>
<ol>
<li><p><strong>Physical Cameras:</strong> It cannot prevent users from taking photos of the screen using another device.</p>
</li>
<li><p><strong>Rooted Devices:</strong> Users with rooted devices can bypass this restriction.</p>
</li>
</ol>
<p>For these reasons, <strong>FLAG_SECURE</strong> should be part of a comprehensive security strategy that includes measures such as:</p>
<ul>
<li><p><strong>Data Encryption:</strong> To protect sensitive data at rest and in transit.</p>
</li>
<li><p><strong>Authentication Protocols:</strong> Using biometrics or two-factor authentication to restrict access.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[QrUnlock: access Events]]></title><description><![CDATA[Control Access and Register Assistances to an Event]]></description><link>https://blogdevtrip.hashnode.dev/qrunlock-access-events</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/qrunlock-access-events</guid><category><![CDATA[PlanetScaleHackathon]]></category><category><![CDATA[PlanetScale]]></category><category><![CDATA[hackathon]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[Heroku]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Mon, 01 Aug 2022 00:20:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/F2KRf_QfCqw/upload/v1659070379207/3NPS2UaBu.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1657690839956/VavChBma2.png" alt="image.png" /></p>
<h2 id="heading-introduction">🎯Introduction</h2>
<p>Hey pals 👋🏻.</p>
<p>I heard about the PlanetScale hackathon weeks ago and I this my first time participanting in  a hackathon .</p>
<h2 id="heading-concept">🤔 Concept</h2>
<p>Access control is something that I like along with the use of Qr codes. Access control issue to a place is something recurring and observed in many places and situations for.</p>
<p>The objective is to be able to accept access to correctly identified users. You can use it for various places and situations depending on the complexity. From access to sectors such as Training, Education and Private</p>
<ul>
<li>Events</li>
<li>Concerts</li>
<li>Conferences</li>
<li>Seminars</li>
<li>Business.</li>
<li>Hotels.</li>
<li>Car parking.</li>
</ul>
<h2 id="heading-qr-codes-be-used-for-attendance">QR Codes be used for attendance?</h2>
<ul>
<li>Less physical contact with people</li>
<li>Agility in marking user assistance at the entrance of the event</li>
</ul>
<h2 id="heading-qr-code-check-in-system">QR Code check-in system.</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659226103749/S6MS6KJSz.png" alt="image.png" /></p>
<p><strong>Consider 2 ways
</strong>
Select First one. I want a recurring group/audience and will have a database of user and with telegram is a easy way to get data.</p>
<h2 id="heading-why-telegram">Why Telegram?</h2>
<ul>
<li>It is guaranteed that the user can register only once (<strong>unique identifier for chat</strong>).</li>
<li>Easy and speed in registering a user.</li>
<li>Notifications</li>
<li>No less important i like automate things and telegram bots</li>
</ul>
<h2 id="heading-tech-stack">⚙️ Tech Stack</h2>
<h3 id="heading-backend">Backend</h3>
<ul>
<li>PlanetScale (MySQL database)</li>
<li>Axios (HTTP request)</li>
<li>NodeJS</li>
<li>Telegram Bot</li>
<li>Heroku (Deploy Bot)</li>
</ul>
<h3 id="heading-front">Front</h3>
<ul>
<li>Android App (Kotlin)</li>
</ul>
<h2 id="heading-apps">Apps</h2>
<h3 id="heading-telegram-bot">Telegram Bot.</h3>
<ul>
<li>Register each user.</li>
<li>Verify user data.</li>
<li>Get QR for attendance</li>
</ul>
<h3 id="heading-android-app">Android App.</h3>
<p>For Scanning each user attendance
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1657690828926/1ZbZnoGHv.png" alt="image.png" /></p>
<h2 id="heading-struggles">🤔 Struggles</h2>
<ul>
<li>Upon startup plan to netlify with lambda function functions and limitation was MySQL database connection with that and I finished using heroku because of the experience in it</li>
<li>Planetscale doesn't support FOREIGN KEY constraints. In that case I found the <a target="_blank" href="https://planetscale.com/docs/learn/operating-without-foreign-key-constraints">documentation</a> that help me.</li>
</ul>
<h2 id="heading-demo">👁️‍🗨️ Demo</h2>
<p><strong>Telegram Bot</strong>
<strong>acces with url web
</strong><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659314353419/qT0J4nN5l.png" alt="image.png" /></p>
<p><strong>inital step
</strong>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659314696284/n_DvpuIEA.png" alt="image.png" /></p>
<p><strong>Functions.</strong></p>
<ol>
<li>Event Details: A website demo for details of Event</li>
<li>Register Event: A User register to Event.</li>
<li>My Qr: received my Qr Code for Attendance.( Please First register)</li>
<li>Source Code: About PlanetScale hackathon and code.
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659314787412/RB8RJ049v.png" alt="image.png" /></li>
</ol>
<p>Event Details:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659315078153/BMFwVsttH.png" alt="image.png" /></p>
<p>Register Event:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659315173638/nM-_3UcUZ.png" alt="image.png" /></p>
<p>My Qr Code</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659315226895/qdp1EZZRF.png" alt="image.png" /></p>
<p>Source Code</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1659315253321/U8faqTtxT.png" alt="image.png" /></p>
<p><a target="_blank" href="https://t.me/QRUnlockBot">Telegram Bot for Register</a></p>
<h2 id="heading-deployment">⚓ Deployment</h2>
<p><strong>Deployment in Heroku and use a Telegram Bot:</strong></p>
<ul>
<li>Register user to System(db in PlanetScale).</li>
<li>Generate Qr code for each user.</li>
</ul>
<p>An Android App.</p>
<ul>
<li>Verification of users </li>
<li>registration of attendance at the Event</li>
</ul>
<h2 id="heading-connect-to-server">Connect to Server</h2>
<h3 id="heading-planetscale-database">PlanetScale Database</h3>
<pre><code><span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span> <span class="hljs-keyword">user</span> (
  <span class="hljs-keyword">id</span> <span class="hljs-built_in">INT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> AUTO_INCREMENT,
  chat_id <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">200</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,
  first_name <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">200</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,
  last_name <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">200</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,
  created_at    DATETIME <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> ,
  updated_at    DATETIME <span class="hljs-keyword">on</span> <span class="hljs-keyword">UPDATE</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> ,
  <span class="hljs-keyword">status</span> <span class="hljs-built_in">BOOLEAN</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-literal">TRUE</span>,
  PRIMARY <span class="hljs-keyword">KEY</span> (<span class="hljs-keyword">id</span>),
  <span class="hljs-keyword">UNIQUE</span> idx_chatid_unique (chat_id(<span class="hljs-number">200</span>))
) <span class="hljs-keyword">ENGINE</span>=<span class="hljs-keyword">InnoDB</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CHARSET</span>=utf8;


<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span> <span class="hljs-keyword">event</span> (
  <span class="hljs-keyword">id</span> <span class="hljs-built_in">INT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> AUTO_INCREMENT ,
    <span class="hljs-keyword">event</span> <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>), 
    description <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">255</span>),
    event_date  DATETIME,
  end_date    DATETIME,
    created_at    DATETIME <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> ,
    updated_at    DATETIME <span class="hljs-keyword">on</span> <span class="hljs-keyword">UPDATE</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> ,
    PRIMARY <span class="hljs-keyword">KEY</span> (<span class="hljs-keyword">id</span>)
) <span class="hljs-keyword">ENGINE</span>=<span class="hljs-keyword">InnoDB</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CHARSET</span>=UTF8;


<span class="hljs-keyword">CREATE</span> <span class="hljs-keyword">TABLE</span>  attendance (
    <span class="hljs-keyword">id</span> <span class="hljs-built_in">INT</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> AUTO_INCREMENT,
    chat_id <span class="hljs-built_in">VARCHAR</span>(<span class="hljs-number">200</span>) <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span>,
  event_id <span class="hljs-built_in">INT</span>,
  created_at    DATETIME <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> ,
    updated_at    DATETIME <span class="hljs-keyword">on</span> <span class="hljs-keyword">UPDATE</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> <span class="hljs-keyword">NOT</span> <span class="hljs-literal">NULL</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CURRENT_TIMESTAMP</span> ,
    PRIMARY <span class="hljs-keyword">KEY</span> (<span class="hljs-keyword">id</span>),
    <span class="hljs-keyword">KEY</span> user_id_idx (chat_id),
    <span class="hljs-keyword">KEY</span> event_id_idx (event_id)
) <span class="hljs-keyword">ENGINE</span>=<span class="hljs-keyword">InnoDB</span> <span class="hljs-keyword">DEFAULT</span> <span class="hljs-keyword">CHARSET</span>=utf8;
</code></pre><h3 id="heading-telegram-bot-configuration">Telegram Bot Configuration:</h3>
<p>Why: for register user to event
check availibity access to Event
Received QR code in case Loose it</p>
<h2 id="heading-future-scope">🔮 Future Scope</h2>
<ul>
<li>I not expert in Web. Will be great make a Web App 
(Admin Portal/ and Event Portal for information) and keep Telegram for user Notifications.</li>
</ul>
<ul>
<li>Hardware: Access Control QR Code RFID Reader Security Entrance in Hotels</li>
</ul>
<p>-Potencial to other Projects: Concerts, Tickets Parking Pass, classroom.</p>
<h2 id="heading-final-word">🙏Final word</h2>
<p>Using Qr Code is a physical to digital channel ideal for streamlining digital attendance tracking from physical touchpoints</p>
<p>Thanks to Hashnode x PlanetScale for giving an opportunity to work on this project.</p>
<h2 id="heading-useful-links">Useful Links 🔗</h2>
<p>Live Site Bot : https://t.me/QRUnlockBot</p>
<p>GitHub repositories: 
<a target="_blank" href="https://github.com/rogergcc/qrunlocks-server">Qr Register Server Code Telegram</a></p>
<p><a target="_blank" href="https://app.mural.co/t/blogteam1386/m/blogteam1386/1657604514012/38f154001e2cc9715e45b8d966951e203c771238?sender=u7f3fb39964fc58ef35d50069">Mural Project Workflow</a></p>
]]></content:encoded></item><item><title><![CDATA[Create your Android Library and Share]]></title><description><![CDATA[DRY and create your library]]></description><link>https://blogdevtrip.hashnode.dev/create-your-android-library-and-share</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/create-your-android-library-and-share</guid><category><![CDATA[learning]]></category><category><![CDATA[library]]></category><category><![CDATA[Android]]></category><category><![CDATA[android app development]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Wed, 13 Jul 2022 14:04:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/4UbSaPKGRqc/upload/v1657720573101/twAIqWA4Xj.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1657720610908/0UcV-C6kK.png" alt="image.png" /></p>
<h2 id="heading-previous-knowledge">Previous knowledge</h2>
<ul>
<li>Git</li>
<li>GitHub</li>
<li>Android Studio</li>
<li>Graddle</li>
<li>Java or Kotlin</li>
</ul>
<h2 id="heading-why">Why</h2>
<p>Not repeat same functions in yours projects</p>
<h2 id="heading-solution">Solution</h2>
<p>Creating your own Android library</p>
<p>After Creating New Project in Javar or Kotlin  min api &gt;21</p>
<h2 id="heading-process">Process</h2>
<p>Create a new Project </p>
<p>Then In the same Project</p>
<p>Create new module type Android Library
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1655255707468/w0PqrfMEF.png" alt="image.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1655255872783/mT73k9fEf.png" alt="image.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1655258392075/SxnGt-_7u.png" alt="image.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1655265772489/zKv9X8z_n.png" alt="image.png" /></p>
<p>Now  take JitPack in the picture and finish the uploading process. Open JitPack and enter the URL of the GitHub repository in the box.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1657720884059/7mNTwrEkh.png" alt="image.png" /></p>
<p>Then check on Get it! and Now you have differents methods of use it</p>
<p>Graddle is for Android </p>
<h2 id="heading-references">References</h2>
<p>https://www.oneclickitsolution.com/blog/android-custom-library/#Introduction_to_Android_Custom_Library</p>
<p>https://jitpack.io/</p>
]]></content:encoded></item><item><title><![CDATA[Chat Bot DIY: Telegram]]></title><description><![CDATA[Easy Way chat bots: Telegram helps]]></description><link>https://blogdevtrip.hashnode.dev/chat-bot-diy-telegram</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/chat-bot-diy-telegram</guid><category><![CDATA[chatbot]]></category><category><![CDATA[APIs]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[telegram]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Thu, 26 May 2022 05:55:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/GWkioAj5aB4/upload/v1653544360372/5HEaTIYT-.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-1-register-your-bot-on-telegram">1. Register your bot on Telegram</h2>
<p>First, you need to tell Telegram you want to register a Bot. To do this, send the BotFather a /newbot command. You get a token back. We’ll use it in our code to authenticate our app against Telegram servers. See the screenshot below. Keep your token in a safe place — i.e., don’t commit it to your version control system.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1618535408531/4BAm8L70D.png" alt="image.png" /></p>
<p>https://api.telegram.org/bot</p>
<p>token = </p>
<p>const telUrl = 'https://api.telegram.org/bot/' + token;</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1617976540857/z655fVl6U.png" alt="image.png" /></p>
<h3 id="heading-set-a-webhook">Set a Webhook</h3>
<p>https://core.telegram.org/bots/api#setwebhook</p>
<h3 id="heading-get-webhook-info">Get Webhook Info</h3>
<p>Telegram docs.  <a target="_blank" href="https://core.telegram.org/bots/api#getwebhookinfo"><strong>here</strong></a> </p>
]]></content:encoded></item><item><title><![CDATA[Access your mobile phone on your machine]]></title><description><![CDATA[Your are an Android Mobile dev or not want to mirror your phone in your pc You need scrcpy I will show how work in windows o.s cause thats what i use…]]></description><link>https://blogdevtrip.hashnode.dev/access-your-mobile-phone-on-your-machine</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/access-your-mobile-phone-on-your-machine</guid><category><![CDATA[mobile]]></category><category><![CDATA[tools]]></category><category><![CDATA[devtools]]></category><category><![CDATA[Android]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Tue, 27 Jul 2021 03:12:15 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1638205089963/B35UQXHkj.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1627264579472/GRRyaZ-UU.png" alt="image.png" /></p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li>some knowledge cmd console</li>
<li>Pc User</li>
<li>Windows O.S</li>
</ul>
<h2 id="heading-introduction">Introduction</h2>
<p><strong>Your are an Android Mobile dev or not 
want to mirror your phone in your pc</strong></p>
<p>  <a target="_blank" href="https://github.com/Genymobile/scrcpy">You need scrcpy </a> </p>
<p>I will show how work in windows o.s cause thats what i use.</p>
<h3 id="heading-download-and-installing">Download and installing</h3>
<p>Download from https://github.com/Genymobile/scrcpy</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1627264769565/cUrVD3Wmh.png" alt="image.png" /></p>
<h3 id="heading-now-make-sure-you-are-in-the-path-that-you-want-to-download-it">Now make sure you are in the path that you want to download it</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1627265001780/p8FmqPoLy.png" alt="image.png" /></p>
<h3 id="heading-prepare-device">Prepare device</h3>
<p>You’ll need to access developer options and enable USB debugging mode before connecting it to your computer with a USB cable. In summary, you’ll head to Settings &gt; About Phone, tap “Build Number” seven times, and then head to Settings &gt; Developer Options and enable “USB Debugging.”</p>
<p>When you’ve done so, connect your Android phone to your computer.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1638205297357/opP2S0aK7w.png" alt="image.png" /></p>
<h3 id="heading-type-cmd-to-open-the-terminal-in-the-current-path">Type  cmd to open the terminal in the current path</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1627265076535/k9taw0Cth.png" alt="image.png" /></p>
<h2 id="heading-finally-type">Finally type</h2>
<pre><code>scrcpy
</code></pre><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1627265144069/UWwtjZmLy.png" alt="image.png" /></p>
<p><img src="https://i.pinimg.com/originals/0f/ab/3e/0fab3e4f7e9e7d3f199c49f10308ac05.gif" alt="thatsall.gif" /></p>
]]></content:encoded></item><item><title><![CDATA[1. Telegram Bot WEBHOOK ?]]></title><description><![CDATA[webhooks]]></description><link>https://blogdevtrip.hashnode.dev/1-telegram-botwebhook</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/1-telegram-botwebhook</guid><category><![CDATA[Web Development]]></category><category><![CDATA[automation]]></category><category><![CDATA[api]]></category><category><![CDATA[http]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Thu, 08 Apr 2021 13:11:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1620824729384/ibkFrY-b5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="webhooks-what-is">Webhooks.  What is?</h1>
<p>They are events that trigger actions. Their name comes from the fact that they function as "hooks" for programs on the Internet and are almost always used for communication between systems. They are the easiest way to get a warning when something happens on another system.</p>
<p>Needed for bots creation like telegram, facebook and others.</p>
<h1 id="same-as-an-api">Same as an API?</h1>
<blockquote>
<p>Almost  😁</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1620824895154/vBGdMAYs-.gif" alt="almost.gif" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1620795665627/Ftyd4Rwhs.png" alt="image.png" /></p>
<p><strong>Give you that info that you need in the time that is ready or when some task occured</strong></p>
<p><em>Thats why u dont have to make many requests(Api) for check if your info is ready
</em></p>
<h1 id="where-is-use">Where is use</h1>
<h2 id="example-case-bank">Example Case: Bank</h2>
<p>When you withdraw money from an ATM, the machine checks your balance and gives you the requested amount. At the end of the operation, the balance is updated and this change triggers an action: the sending of an SMS with the details of the withdrawal</p>
<p>Webhooks are used for real-time notifications, so the system can update itself when the event occurs.</p>
<p>other uses: </p>
<ul>
<li>Synchronize systems in real time.</li>
</ul>
<ul>
<li><p>Send any type of notification.</p>
</li>
<li><p>Process the data as you want</p>
</li>
<li><p>Create reports.</p>
</li>
</ul>
<h3 id="useful-info">Useful info</h3>
<p>https://es.mailjet.com/blog/</p>
]]></content:encoded></item><item><title><![CDATA[Custom Domain for your WebApp project]]></title><description><![CDATA[U want a free custom domain for some personal project. ? there is a way CHECK It is too much to say that here you will not find a .com .org .tech or…]]></description><link>https://blogdevtrip.hashnode.dev/custom-domain-for-your-webapp-project</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/custom-domain-for-your-webapp-project</guid><category><![CDATA[frontend]]></category><category><![CDATA[deployment]]></category><category><![CDATA[domain]]></category><category><![CDATA[education]]></category><category><![CDATA[2Articles1Week]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Tue, 09 Mar 2021 16:34:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1615302790500/MbigOs3-W.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="custom-domain">Custom Domain.</h1>
<p><strong>U want a free custom domain for some personal project. ?</strong>
there is a way </p>
<p>CHECK  <a target="_blank" href="http://www.freenom.com/en/index.html">http://www.freenom.com/en/index.html</a> </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615302690247/hCGTk1tKn.png" alt="image.png" /></p>
<blockquote>
<p>It is too much to say that here you will not find a .com .org .tech or whatever you think.</p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615302896040/PratcqFbm.png" alt="image.png" /></p>
<p>then https://my.freenom.com/clientarea.php</p>
<h2 id="configuration">Configuration:</h2>
<h3 id="case-github-project">Case: Github project</h3>
<p>Go to <strong>Manage Freenom DNS</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615303167459/0TsOOOf15.png" alt="image.png" /></p>
<h2 id="now-in-github">Now in github.</h2>
<ul>
<li>Verify CNAME.</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1617839460355/nLyoAWH6M.png" alt="image.png" /></p>
<ul>
<li>In your repository settings (you have to wait a few minutes to see the result
)</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615304580372/lGUYNI9pS.png" alt="image.png" /></p>
<h2 id="result">result:</h2>
<p>https://dailyspecialsmenu.cf/</p>
<h2 id="useful-links">Useful links</h2>
<p>https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site</p>
]]></content:encoded></item><item><title><![CDATA["Deploy" your web project  on Web temporarily with Ngrok]]></title><description><![CDATA[Testing your project and have Public URLs from your localhost temporarily]]></description><link>https://blogdevtrip.hashnode.dev/deploy-your-web-project-on-web-temporarily-with-ngrok</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/deploy-your-web-project-on-web-temporarily-with-ngrok</guid><category><![CDATA[Productivity]]></category><category><![CDATA[deployment]]></category><category><![CDATA[test]]></category><category><![CDATA[2Articles1Week]]></category><category><![CDATA[Hashnode]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Tue, 09 Mar 2021 15:36:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1615265223932/NAcOyrXyb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615264378088/2-1W6zb7Z.png" alt="image.png" /></p>
<h2 id="situation">Situation:</h2>
<p><em>Have you project in localhost working nice.</em></p>
<p>But for some reason u want to testing deployed on web.</p>
<p>You could use heroku, GCP, Firebase hosting. Most of Then must have a account for each service and you only want testing temporary your web api or chatbot.</p>
<p>ngrok is a tool that could help you.</p>
<h2 id="create-account-and-go-to-dashboard">Create account and go to dashboard</h2>
<p>https://dashboard.ngrok.com/get-started/setup</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1615263557579/bIo8RU2P2.png" alt="image.png" /></p>
<h2 id="install">Install</h2>
<p>Run your project in localhost and copy your  <em>PORT</em>.</p>
<p>then install  and execute <strong>ngrok.exe</strong></p>
<p>and type</p>
<pre><code><span class="hljs-selector-tag">ngrok</span> <span class="hljs-selector-tag">authtoken</span> <span class="hljs-selector-attr">[YOUR TOKEN]</span>

<span class="hljs-selector-tag">ngrok</span> <span class="hljs-selector-tag">http</span> <span class="hljs-selector-attr">[SAME-PORT-LOCALHOST-PROJECT]</span>
</code></pre>]]></content:encoded></item><item><title><![CDATA[Configuration Eslint for Visual Studio Code]]></title><description><![CDATA[Eslint + standar setup for VSC]]></description><link>https://blogdevtrip.hashnode.dev/configuration-eslint-for-visual-studio-code</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/configuration-eslint-for-visual-studio-code</guid><category><![CDATA[eslint]]></category><category><![CDATA[Visual Studio Code]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[vscode extensions]]></category><category><![CDATA[automation]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Sun, 28 Feb 2021 23:06:56 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1614553402113/dzOXX9iwp.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A easy way to check and fix error while your are coding in <strong>Visual Studio Code</strong>
Eslint + Error Lens</p>
<p><em>ESlint</em>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614547684760/qhS3LLvtg.png" alt="image.png" /></p>
<p><em>Error Lens </em>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614547815353/f2sUBkRuc.png" alt="image.png" /></p>
<h2 id="eslint-configuration">ESLint Configuration</h2>
<p>Now u have to install package and  config  <strong>eslin file</strong>. (But this way u have to have this in every project)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614549124963/WPLvgHuQ1.png" alt="image.png" /></p>
<h2 id="other-way-is-using-standard">Other way is using  <strong>standard</strong></h2>
<pre><code>$ <span class="hljs-built_in">npm</span> i standard -D
</code></pre><p>and modify package.json</p>
<pre><code><span class="hljs-string">"devDependencies"</span>: {
    <span class="hljs-string">"standard"</span>: <span class="hljs-string">"16.0.3"</span>
  },
  <span class="hljs-string">"eslintConfig"</span>: {
    <span class="hljs-string">"extends"</span>: <span class="hljs-string">"./node_modules/standard/eslintrc.json"</span>
  }
</code></pre><h2 id="and-finally-could-try-config-eslint-extesion-run-on-save">And Finally could try config Eslint extesion run on save.</h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614551314478/iJAIUyzmV.png" alt="image.png" /></p>
<p>And aut fix format ESlint On Save. <em>Go to Visual Studio Code  user [setting.json]</em></p>
<pre><code><span class="hljs-attr">"editor.codeActionsOnSave":</span> {
        <span class="hljs-attr">"source.fixAll":</span> <span class="hljs-literal">true</span>
    }
</code></pre><h3 id="when-u-save-this-file-will-fix">when u <strong>SAVE</strong>  this file will fix</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614552913238/FqPSnVK2I.png" alt="image.png" /></p>
]]></content:encoded></item><item><title><![CDATA[Android Studio -  Useful Shortcuts]]></title><description><![CDATA[IDE: Android Studio for android apps development. CTRL + ALT + L = REFORMAT CODE in a file. CTRL + ALT + O = REMOVE unused import. CTRL + ALT + MAYUS LEFT…]]></description><link>https://blogdevtrip.hashnode.dev/android-studio-useful-shortcuts</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/android-studio-useful-shortcuts</guid><category><![CDATA[Productivity]]></category><category><![CDATA[Android Studio]]></category><category><![CDATA[android apps]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Fri, 27 Nov 2020 17:19:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1606497704840/HrFFiSjtx.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>IDE: Android Studio for android apps development.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614914394477/dChwy4jxc6.png" alt="image.png" />
<kbd>CTRL</kbd> + <kbd>ALT </kbd> + <kbd>L</kbd> = REFORMAT CODE in a file.</p>
<p><kbd>CTRL</kbd> + <kbd>ALT</kbd> + <kbd>O</kbd> = REMOVE unused import.</p>
<p><kbd>CTRL</kbd> + <kbd>ALT</kbd> +  <kbd>MAYUS LEFT</kbd>  + <kbd>O</kbd> =PROJECT STRUCTURE
GRADLE VERSION AND ANDROID GRADDLE PLUGIN VERSION.</p>
<p><kbd>LEFT SHIFT</kbd> + <kbd>LEFT SHIFT</kbd> = Searching any file.</p>
<p><kbd>CTRL</kbd> + <kbd>LEFT SHIFT</kbd> + <kbd>F</kbd> =Searching  for any word in any file in project.</p>
<p><kbd>SHIFT</kbd> + <kbd>6</kbd> = Rename in all occurrences for a variable.</p>
<p><kbd>ALT </kbd> + <kbd>.</kbd> = Select import from a suggested list.</p>
<p><kbd>CTRL</kbd> + <kbd>ALT </kbd> + <kbd> . </kbd> = Navigate and select between custom regions</p>
<p><kbd>CTRL</kbd> + <kbd> . </kbd> = minimize and maximize custom region</p>
<p><kbd>CTRL</kbd> + <kbd> - </kbd> = minimize custom region</p>
<h2 id="heading-extras"><strong>extras</strong></h2>
<p><kbd>ALT</kbd> + <kbd>j</kbd> =&gt; Select word occurrences by each word. Its like <kbd>CTRL</kbd> + <kbd>D</kbd> in sublime text.</p>
<p><kbd>ALT</kbd>+<kbd>INSERT </kbd> =&gt; Generate code</p>
<p><kbd>CTRL</kbd> + <kbd>ALT </kbd> + <kbd>t</kbd> = Menu useful options code generate</p>
<p><kbd>CTRL</kbd> + <kbd>ALT </kbd> + <kbd>m</kbd> = Extraer seleccion de codigo y lo extrae a un metodo </p>
]]></content:encoded></item><item><title><![CDATA[Deploy your Nodejs Project to Heroku]]></title><description><![CDATA[Some previus knowledge that helps you: Must have: heroku account create. create new project(create new app) in heroku dashboard. Install heroku CLI. Is a…]]></description><link>https://blogdevtrip.hashnode.dev/deploy-your-nodejs-project-to-heroku</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/deploy-your-nodejs-project-to-heroku</guid><category><![CDATA[Node.js]]></category><category><![CDATA[Git]]></category><category><![CDATA[npm]]></category><category><![CDATA[Heroku]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Tue, 17 Nov 2020 02:04:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1605578393436/8yw5GSvr8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1605578230037/ymxgdwXrl.png" alt="image.png" /></p>
<h2 id="heading-this-post-is-useful-for-beginners-that-want-to-deploying-free-a-nodejs-project">This post is useful for beginners that want to deploying free a nodejs project.</h2>
<p>Some previus knowledge that helps you:</p>
<ul>
<li>git and github.</li>
</ul>
<p>Must have:</p>
<ul>
<li><p>heroku account create.</p>
</li>
<li><p>create new project(<strong>create new app</strong>) in heroku dashboard.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614564761445/nDg_bqsro.png" alt="image.png" /></p>
<p>Install heroku CLI. Is a npm package u must install it global</p>
<pre><code class="lang-plaintext">npm i -g heroku
</code></pre>
<p>Login to your heroku account with your credentials.</p>
<pre><code class="lang-plaintext">heroku login
</code></pre>
<p>Your project must be a git version control init.</p>
<pre><code class="lang-plaintext">git init
git add README.md
git commit -m "first commit"
git branch -M main
</code></pre>
<h2 id="heading-method-1">Method 1 :</h2>
<p><strong>Get remote url app from heroku app <em>(if you create from heroku dashboar site)</em>.</strong></p>
<pre><code class="lang-plaintext">heroku git:remote -a my-project-name
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1614564874219/ECmqgcM1W.png" alt="image.png" /></p>
<h2 id="heading-method-2">Method 2 :</h2>
<p>**create heroku app from CLI **</p>
<pre><code class="lang-plaintext">heroku apps:create my-other-project-name
</code></pre>
<p>Push changes and deploy it</p>
<pre><code class="lang-plaintext">git push heroku main
</code></pre>
<p>You can check a list of your heroku apps with</p>
<pre><code class="lang-plaintext"> heroku apps
</code></pre>
<p>U have .env variables?. examples</p>
<pre><code class="lang-plaintext">heroku config:set TOKEN=VALUE
heroku config:set OTHER_SECRET_TOKEN=VALUE
</code></pre>
<p>Details.</p>
<p>https://devcenter.heroku.com/articles/heroku-cli</p>
<p>https://devcenter.heroku.com/articles/heroku-cli-commands  </p>
<p><strong>update</strong> free version is not free anymore</p>
]]></content:encoded></item><item><title><![CDATA[Web api with Google Sheet + AppScript]]></title><description><![CDATA[Google Sheets — AppScript With Google spreadsheets we can perform operations such as Insert / Update / Delete / Read using Google AppScript. And it can be…]]></description><link>https://blogdevtrip.hashnode.dev/web-api-with-google-sheet-appscript-1</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/web-api-with-google-sheet-appscript-1</guid><category><![CDATA[google sheets]]></category><category><![CDATA[Web API]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Google]]></category><category><![CDATA[json]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Mon, 26 Oct 2020 20:14:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1611183767436/tohzfQZ7S.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1610669197425/ktOAO6Fks.png" alt="_ogg_image.PNG" /></p>
<h1 id="heading-web-api-with-google-sheet-appscript">Web api with Google Sheet + AppScript</h1>
<p>Google Sheets — AppScript</p>
<p>With Google spreadsheets we can perform operations such as Insert / Update / Delete / <strong>Read</strong> using <em>Google</em> <a target="_blank" href="https://script.google.com/"><em>AppScript</em></a>. And it can be used as our backend.</p>
<h1 id="heading-google-spreadsheet-settings">Google spreadsheet settings:</h1>
<ol>
<li>Login to your Google account</li>
<li>Create a new spreadsheet CLICK_ <a target="_blank" href="https://docs.google.com/spreadsheets/">HERE</a> .</li>
</ol>
<p>3. As in the image below, go to <strong>Tools → Script Editor.</strong></p>
<img alt="Image for post" class="dx iy dy iz t" src="https://miro.medium.com/max/852/0*HmZUqdo0SgYw9X2_.png" />

<h1 id="heading-google-appscript-settings">Google AppScript Settings:</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1619019668673/waWvR80Q8.png" alt="image.png" /></p>
<ol>
<li>Then you will see the following screen.</li>
</ol>
<p>Here in this editor , we have to write the code that act as a web API and will intereact GoogleSheets.</p>
<p>2<span id="rmm">.</span> Below is the AppScript that you should write to the above file and save it.</p>
<pre><code>const sheet <span class="hljs-operator">=</span> SpreadsheetApp.getActive().getSheetByName(<span class="hljs-string">'Sheet1'</span>)

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">doGet</span>(<span class="hljs-params">e</span>)</span>{
  const action <span class="hljs-operator">=</span> e.parameter.action;

  <span class="hljs-comment">//URL_SCRIPT/exec?action=getItems</span>
  <span class="hljs-keyword">if</span>(action <span class="hljs-operator">=</span><span class="hljs-operator">=</span> <span class="hljs-string">'getItems'</span>){
    <span class="hljs-keyword">return</span> getItems(e);
  }
}

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getItems</span>(<span class="hljs-params">e</span>)</span>{
  let records<span class="hljs-operator">=</span>{};
  const rows <span class="hljs-operator">=</span> sheet.getRange(<span class="hljs-number">2</span>, <span class="hljs-number">1</span>, sheet.getLastRow() <span class="hljs-operator">-</span> <span class="hljs-number">1</span>,sheet.getLastColumn()).getValues();
  const sizeRows <span class="hljs-operator">=</span> rows.<span class="hljs-built_in">length</span>; 
  let data <span class="hljs-operator">=</span> [];

  <span class="hljs-keyword">for</span> (let i <span class="hljs-operator">=</span> <span class="hljs-number">0</span>; i <span class="hljs-operator">&lt;</span> sizeRows; i<span class="hljs-operator">+</span><span class="hljs-operator">+</span>) {
    let row <span class="hljs-operator">=</span> rows[i],
    record  <span class="hljs-operator">=</span> {};
    record[<span class="hljs-string">'Title'</span>] <span class="hljs-operator">=</span> row[<span class="hljs-number">0</span>];
    record[<span class="hljs-string">'Description'</span>]<span class="hljs-operator">=</span>row[<span class="hljs-number">1</span>];
    record[<span class="hljs-string">'Price'</span>]<span class="hljs-operator">=</span>row[<span class="hljs-number">2</span>];
    data.<span class="hljs-built_in">push</span>(record);
   }
  records.items <span class="hljs-operator">=</span> data;
  let result<span class="hljs-operator">=</span>JSON.stringify(records);
  <span class="hljs-keyword">return</span> ContentService.createTextOutput(result).setMimeType(ContentService.MimeType.JSON);
}
</code></pre><p>3. Select from tab, <strong>Publish → Deploy as web app</strong></p>
<img alt="Image for post" class="dx iy dy iz t" src="https://miro.medium.com/max/1162/0*GyYgPV17EH-Rv57S.png" />

<p>4. You will see a window like this, just make sure to select ‘Run the application’ as ‘Me’ and ‘Who has access to the application’ as ‘Anyone, even anonymous’. Every time you perform an update you must choose a new one</p>
<img alt="Image for post" class="dx iy dy iz t" src="https://miro.medium.com/max/926/0*gPPd8hBq3hG_QyA2.png" />

<p>Authorization is required. Just check the permissions. Then select your Google account.</p>
<img alt="Image for post" class="dx iy dy iz t" src="https://miro.medium.com/max/934/0*8aZNBP1IjAt8CN0_.png" />

<p>You will see a screen, just expand ‘Advanced’ and click on ‘Go to YOUR_PROJECT_NAME (insecure)’.</p>
<img alt="Image for post" class="dx iy dy iz t" src="https://miro.medium.com/max/1176/0*x5wlZ_fejyqHwTA7.png" />

<p>Allow these permissions and voila!
Finally, you will get a window like this with the URL of the web application. Copy that web url for reference. We will use this URL to make HTTP GET requests.</p>
<img alt="Image for post" class="dx iy dy iz t" src="https://miro.medium.com/max/896/0*Lvk94EXdnHUahNOP.png" />

<p>Copy the url plus the function that we declare:
WEB_APP_URL_SCRIPT / exec? Action = getItems</p>
<p><strong>1. Web Api:</strong> <a target="_blank" href="https://script.google.com/macros/s/AKfycbyLckccMCPrXop-QR1yQ-zD2zOjiagmQGNlixF6WFB1BsxDmw/exec?action=getItems">https://script.google.com/macros/s/AKfycby01lKNm94FHYORH3_c-lHK35r4zOoZiF8_tOD-QhfujBcglDiE</a></p>
<p><strong>2. Example Published</strong> <a target="_blank" href="https://dailyspecialsmenu.netlify.app/">https://dailyspecialsmenu.netlify.app/</a></p>
<p><strong>3. AppScript Code</strong>
https://gist.github.com/rogergcc/071225ef95055476e4685f01e9697486</p>
<p><a target="_blank" href="https://github.com/rogergcc/specials_menu.git">https://github.com/rogergcc/specials_menu.git</a></p>
]]></content:encoded></item><item><title><![CDATA[Web api with Google Sheet + AppScript]]></title><description><![CDATA[Google Sheets — AppScript With Google spreadsheets we can perform operations such as Insert / Update / Delete / Read using Google AppScript. And it can be…]]></description><link>https://blogdevtrip.hashnode.dev/web-api-with-google-sheet-appscript</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/web-api-with-google-sheet-appscript</guid><category><![CDATA[google sheets]]></category><category><![CDATA[google apps script]]></category><category><![CDATA[Web API]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Mon, 26 Oct 2020 20:13:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1603743107759/_ZGFnzEeL.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><span class="w"></span><img src="https://miro.medium.com/proxy/1*Xt9fFwPitesjZhX2tsId8A.png" alt="Image for post" /></p>
<h1 id="web-api-with-google-sheet-appscript">Web api with Google Sheet + AppScript</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1603742895270/9ARlg9FMq.png" alt="image.png" />
Google Sheets — AppScript</p>
<p>With Google spreadsheets we can perform operations such as Insert / Update / Delete / <strong>Read</strong> using <em>Google</em> <a target="_blank" href="https://script.google.com/"><em>AppScript</em></a>. And it can be used as our backend.</p>
<h1 id="google-spreadsheet-settings">Google spreadsheet settings:</h1>
<ol>
<li>Login to your Google account</li>
<li>Create a new spreadsheet CLICK_ <a target="_blank" href="https://docs.google.com/spreadsheets/">HERE</a> .</li>
<li>When you create a spreadsheet you will see the id in the url as highlighted in the following image</li>
</ol>
<p>Copy the url of your google sheet.</p>
<p>As above, you can see that I have highlighted part of the url. You can copy the shared url as you realize or just the url <strong><em>.</em></strong></p>
<p>4. As in the image below, go to <strong>Tools → Script Editor.</strong></p>
<p><img src="https://miro.medium.com/max/60/0*HmZUqdo0SgYw9X2_.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/852/0*HmZUqdo0SgYw9X2_.png" />

<h1 id="google-appscript-settings">Google AppScript Settings:</h1>
<ol>
<li>Then you will see the following screen.</li>
</ol>
<p>Here in this editor , we have to write the code that act as a web API and will intereact GoogleSheets.</p>
<p>2<span id="rmm">.</span> Below is the AppScript that you should write to the above file and save it.</p>
<p>3. Select from tab, <strong>Publish → Deploy as web app</strong></p>
<p><img src="https://miro.medium.com/max/60/0*ycqb5RelAxaIxdNO?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/120/0*ycqb5RelAxaIxdNO" />

<p><img src="https://miro.medium.com/max/60/0*GyYgPV17EH-Rv57S.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/1162/0*GyYgPV17EH-Rv57S.png" />

<p>4. You will see a window like this, just make sure to select ‘Run the application’ as ‘Me’ and ‘Who has access to the application’ as ‘Anyone, even anonymous’. Every time you perform an update you must choose a new one</p>
<p><img src="https://miro.medium.com/max/58/0*_ReWOn2mTvsdYgjH?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/116/0*_ReWOn2mTvsdYgjH" />

<p><img src="https://miro.medium.com/max/58/0*gPPd8hBq3hG_QyA2.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/926/0*gPPd8hBq3hG_QyA2.png" />

<p>Authorization is required. Just check the permissions. Then select your Google account.</p>
<p><img src="https://miro.medium.com/max/60/0*8aZNBP1IjAt8CN0_.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/934/0*8aZNBP1IjAt8CN0_.png" />

<p>You will see a screen, just expand ‘Advanced’ and click on ‘Go to YOUR_PROJECT_NAME (insecure)’.</p>
<p><img src="https://miro.medium.com/max/60/0*x5wlZ_fejyqHwTA7.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/1176/0*x5wlZ_fejyqHwTA7.png" />

<p>Allow these permissions and voila!
Finally, you will get a window like this with the URL of the web application. Copy that web url for reference. We will use this URL to make HTTP GET requests.</p>
<p><img src="https://miro.medium.com/max/60/0*xEQLhR10X1RDDX1M?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/120/0*xEQLhR10X1RDDX1M" />

<p><img src="https://miro.medium.com/max/60/0*Lvk94EXdnHUahNOP.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/896/0*Lvk94EXdnHUahNOP.png" />

<p>Copy the url plus the function that we declare:
WEB_APP_URL_SCRIPT / exec? Action = getItems
<strong>URLs:</strong>
<strong>1. Web Api:</strong> <a target="_blank" href="https://script.google.com/macros/s/AKfycby01lKNm94FHYORH3_c-lHK35r4zOoZiF8_tOD-QhfujBglDiE/exec?action=getItems">https://script.google.com/macros/s/AKfycby01lKNm94FHYORH3_c-lHK35r4zOoZiF8_tOD-QhfujBcglDiE</a>
<strong>2. Example Published</strong> <a target="_blank" href="https://rogergcc.github.io/specials_menu/">: https:</a> //script.exection
<a target="_blank" href="https://rogergcc.github.io/specials_menu/">//rogergcc.github.io/specials_menu/</a></p>
<p><a target="_blank" href="https://github.com/rogergcc/specials_menu.git">https://github.com/rogergcc/specials_menu.git</a></p>
]]></content:encoded></item><item><title><![CDATA[Webservices en minutos con Google Sheet como fuente de datos]]></title><description><![CDATA[Google Sheets — AppScript La hoja de cálculo de Google podemos realizar varias operaciones como Insertar / Actualizar / Eliminar / Leer usando Google…]]></description><link>https://blogdevtrip.hashnode.dev/webservices-en-minutos-con-google-sheet-como-fuente-de-datos</link><guid isPermaLink="true">https://blogdevtrip.hashnode.dev/webservices-en-minutos-con-google-sheet-como-fuente-de-datos</guid><category><![CDATA[google sheets]]></category><category><![CDATA[Web API]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Roger Colque Calcina]]></dc:creator><pubDate>Sun, 25 Oct 2020 16:52:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1603646406749/e4oGLlaVw.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><span class="w"></span><img src="https://miro.medium.com/max/60/1*Xt9fFwPitesjZhX2tsId8A.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/2312/1*Xt9fFwPitesjZhX2tsId8A.png" />

<h1 id="web-api-con-google-sheet-appscript">Web api con Google Sheet + AppScript</h1>
<p>Google Sheets — AppScript</p>
<p>La hoja de cálculo de Google podemos realizar varias operaciones como Insertar / Actualizar / Eliminar / <strong>Leer</strong> usando Google <a target="_blank" href="https://script.google.com/">AppScript</a> . Y puede ser usarda como nuestro backend.</p>
<p><span class="ia gg bk ib ic id"></span><span class="ia gg bk ib ic id"></span><span class="ia gg bk ib ic"></span></p>
<h1 id="configuracion-de-la-hoja-de-calculo-de-google">Configuración de la hoja de cálculo de Google:</h1>
<ol>
<li>Inicie sesión en su cuenta de Google</li>
<li>Crea una nueva hoja de cálculo CLICK_<a target="_blank" href="https://docs.google.com/spreadsheets/">AQUÍ</a> .</li>
<li>Cuando cree una hoja de cálculo, verá la identificación en la URL como se resalta en la siguiente imagen</li>
</ol>
<p>Copie la url de su hoja google sheet.</p>
<p>Como arriba, puede ver que he resaltado parte de la URL. Puede copiar la url compartida como lo realize o solo la url<strong><em>.</em></strong></p>
<p>4. Como en la imagen de abajo, vaya a <strong>Herramientas → Editor de secuencias de comandos.</strong></p>
<p><img src="https://miro.medium.com/proxy/1*vYf73i0udwpIVeuavbpg8A.png" alt="Image for post" /></p>
<h1 id="configuracion-de-google-appscript">Configuración de Google AppScript:</h1>
<ol>
<li>Después del paso anterior, verá la siguiente pantalla.</li>
</ol>
<p>Aquí, en este editor<span id="rmm">,</span> tenemos que escribir AppScript que actuará como una API web y que se comunicará con las hojas de Google.</p>
<p>2. A continuación se muestra el AppScript que debe escribir en el archivo anterior y guardarlo.</p>
<p>3. Select from tab, <strong>Publish → Deploy as web app</strong></p>
<p><img src="https://miro.medium.com/max/60/1*68DVGsy4oRi3mWTptvLq5A.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/1162/1*68DVGsy4oRi3mWTptvLq5A.png" />

<p>4. Verá una ventana como esta, solo asegúrese de seleccionar ‘Ejecutar la aplicación’ como ’ Yo’ y ‘Quién tiene acceso a la aplicación’ como ’ Cualquiera, incluso anónimo’. Cada vez q realize una actualizacion se debe elegir nuevo</p>
<p><img src="https://miro.medium.com/max/58/1*LcLtlzKNuZUr6VozWMS8kQ.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/926/1*LcLtlzKNuZUr6VozWMS8kQ.png" />

<p>Se requiere autorización. Solo revisa los permisos. Luego seleccione su cuenta de Google.</p>
<p><img src="https://miro.medium.com/proxy/1*ElciD3Gmi0UpBSQtVzNhIw.png" alt="Image for post" /></p>
<p>Verá una pantalla, simplemente expanda ‘Avanzado’ y haga clic en ’ Ir a YOUR_PROJECT_NAME (inseguro)’.</p>
<p><img src="https://miro.medium.com/proxy/1*Vq274CSs2GPYv6vCXqRacg.png" alt="Image for post" /></p>
<p>¡Permita estos permisos y listo!
Finalmente, obtendrá una ventana como esta con la URL de la aplicación web. Copie esa URL web como referencia. Usaremos esta URL para realizar solicitudes HTTP GET.</p>
<p><img src="https://miro.medium.com/max/60/1*hTVhu4Z4eubuThjMpxreNw.png?q=20" alt="Image for post" /></p>
<img alt="Image for post" src="https://miro.medium.com/max/896/1*hTVhu4Z4eubuThjMpxreNw.png" />

<p>Copiamos la url mas la funcion q declaramos:
WEB_APP_URL_SCRIPT/exec?action=getItems
<strong>URLs:</strong>
Web Api: <a target="_blank" href="https://script.google.com/macros/s/AKfycby01lKNm94FHYORH3_c-lHK35r4zOoZiF8_tOD-QhfujBglDiE/exec?action=getItems">https://script.google.com/macros/s/AKfycby01lKNm94FHYORH3_c-lHK35r4zOoZiF8_tOD-QhfujBglDiE/exec?action=getItems</a>
Ejemplo Publicado
<a target="_blank" href="https://rogergcc.github.io/specials_menu/">https://rogergcc.github.io/specials_menu/</a></p>
<p><a target="_blank" href="https://github.com/rogergcc/specials_menu.git">https://github.com/rogergcc/specials_menu.git</a></p>
]]></content:encoded></item></channel></rss>