PageSourceSearch

https://godfreylebo.vercel.app/_next/static/chunks/pages/projects/imei-getter-a7d8728503121e55.js

js godfreylebo.vercel.app collected 2026-10-03 07:01:53 UTC 8,347 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[815],{4464:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/projects/imei-getter",function(){return n(317)}])},8331:function(e,t){"use strict";t.Z={src:"/_next/static/media/flutter_biometric_crypto_logo_1765605502854.a3970cb6.png",height:1024,width:1024,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAMFBMVEUADikRKUcHHDgCCiILFi4iMUk2UXREcJVJjbMVPmJik7I9Y4h3u9ZQeJZUfJlWiq2BY4k7AAAACXBIWXMAAC4jAAAuIwF4pT92AAAAOUlEQVR4nB2JyQ3AMAzDJPnI2Wb/bQPnRYKEASRgAPh/RHHu3sp4dl8lWrOl3sus4BFjMBzmkuR2ASDHAPFrNwaAAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},9095:function(e,t,n){"use strict";n.d(t,{B:function(){return h}});var s=n(5893),i=n(9008),r=n.n(i),a=n(1163),c=n(2962),o=n(5649),l=n(3652),d=n(3621),u=n(4163);function m(e){return(0,s.jsx)("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:(0,s.jsx)("path",{d:"M7.25 11.25 3.75 8m0 0 3.5-3.25M3.75 8h8.5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function h(e){let{children:t,meta:n,isRssFeed:i=!1,previousPathname:h}=e,p=(0,a.useRouter)();if(i)return t;let x=`${u.J.url}${p.asPath.split("?")[0]}`,g=n.date?new Date(n.date).toISOString():void 0;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r(),{children:[(0,s.jsx)("title",{children:`${n.title} - ${u.J.name}`}),(0,s.jsx)("meta",{name:"description",content:n.description}),(0,s.jsx)("link",{rel:"canonical",href:x}),(0,s.jsx)("meta",{property:"og:type",content:"article"}),(0,s.jsx)("meta",{property:"og:title",content:n.title}),(0,s.jsx)("meta",{property:"og:description",content:n.description}),(0,s.jsx)("meta",{property:"og:url",content:x}),(0,s.jsx)("meta",{property:"og:image",content:u.J.ogImage}),g&&(0,s.jsx)("meta",{property:"article:published_time",content:g}),(0,s.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,s.jsx)("meta",{name:"twitter:title",content:n.title}),(0,s.jsx)("meta",{name:"twitter:description",content:n.description}),(0,s.jsx)("meta",{name:"twitter:image",content:u.J.ogImage})]}),(0,s.jsx)(c.dX,{url:x,title:n.title,description:n.description,images:[u.J.ogImage],datePublished:g,authorName:[{name:n.author||u.J.name,url:u.J.url}
1],publisherName:u.J.name,publisherLogo:u.J.ogImage,isAccessibleForFree:!0}),(0,s.jsx)(o.W,{className:"mt-16 lg:mt-32",children:(0,s.jsx)("div",{className:"xl:relative",children:(0,s.jsxs)("div",{className:"mx-auto max-w-2xl",children:[h&&(0,s.jsx)("a",{href:h,"aria-label":"Go back to articles",className:"group mb-8 flex h-10 w-10 items-center justify-center rounded-full bg-white shadow-md shadow-zinc-800/5 ring-1 ring-zinc-900/5 transition dark:border dark:border-zinc-700/50 dark:bg-zinc-800 dark:ring-0 dark:ring-white/10 dark:hover:border-zinc-700 dark:hover:ring-white/20 lg:absolute lg:-left-5 lg:mb-0 lg:-mt-2 xl:-top-1.5 xl:left-0 xl:mt-0",children:(0,s.jsx)(m,{className:"h-4 w-4 stroke-zinc-500 transition group-hover:stroke-zinc-700 dark:stroke-zinc-500 dark:group-hover:stroke-zinc-400"})}),(0,s.jsxs)("article",{children:[(0,s.jsxs)("header",{className:"flex flex-col",children:[(0,s.jsx)("h1",{className:"mt-6 text-4xl font-bold tracking-tight text-zinc-800 dark:text-zinc-100 sm:text-5xl",children:n.title}),(0,s.jsxs)("time",{dateTime:n.date,className:"order-first flex items-center text-base text-zinc-400 dark:text-zinc-500",children:[(0,s.jsx)("span",{className:"h-4 w-0.5 rounded-full bg-zinc-200 dark:bg-zinc-500"}),(0,s.jsx)("span",{className:"ml-3",children:(0,l.p)(n.date)})]})]}),(0,s.jsx)(d.M,{className:"mt-8",children:t})]})]})})})]})}},3621:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});var s=n(5893),i=n(6010);function r(e){let{children:t,className:n}=e;return(0,s.jsx)("div",{className:(0,i.Z)(n,"prose dark:prose-invert"),children:t})}},3652:function(e,t,n){"use strict";function s(e){return new Date(`${e}T00:00:00Z`).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"})}n.d(t,{p:function(){return s}})},317:function(e,t,n){"use strict";n.r(t),n.d(t,{meta:function(){return l}});var s=n(5893),i=n(1151),r=n(9095),a=n(5675),c=n.n(a),o=n(8331);let l={author:"Godfrey Lebo",date:"2025-12-18",title:"IMEI Getter",description:"A Flutter plugin to get device identifiers (IMEI, AndroidId, etc.) with proper permission handling."},d=e=>(0,s.jsx)(r.B,Object.assign({meta:l},e));function u(e){let t=Object.assign({h2:"h2",p:"p",strong:"strong",ul:"ul",li:"li",code:"code",pre:"pre",span:"span"},(0,i.ah)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex justify-center my-8",children:(0,s.jsx)(c(),{src:o.Z,alt:"IMEI Getter Logo",width:120,height:120,unoptimized:!0})}),"\n",(0,s.jsx)(t.h2,{children:"Overview"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"IMEI Getter"})," simplifies the complex task of retrieving unique device identifiers on Android and iOS. It handles the nuances of identifying devices across different OS versions, where permissions and available identifiers (IMEI vs UUID vs AndroidID) change frequently."]}),"\n",(0,s.jsx)(t.h2,{children:"The Status Quo"}),"\n",(0,s.jsx)(t.p,{children:'Since Android 10, accessing the actual IMEI is restricted to system apps or device owners. Developers often write spaghetti code: "If Android < 10 get IMEI, else get AndroidID, but if iOS get VendorID...". This fragmentation leads to bugs and rejected app store submissions.'}),"\n",(0,s.jsx)(t.h2,{children:"Market Proposition"}),"\n",(0,s.jsx)(t.p,{children:'A "Smart" Identifier Strategy.'}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Auto-Fallback"}),": Tries to get the most persistent ID permitted by the OS."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Permission Handling"}),": built-in methods to request ",(0,s.jsx)(t.code,{children:"READ_PHONE_STATE"})," only when necessary."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Cross-Platform"}),": Unified API for Android and iOS."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{children:"Usage"}),"\n",(0,s.jsx)(t.pre,{className:"language-dart",children:(0,s.jsxs)(t.code,{className:"language-dart",children:[(0,s.jsx)(t.span,{className:"token keyword",children:"import"})," ",(0,s.jsx)(t.span,{className:"token string-literal",children:(0,s.jsx)(t.span,{className:"token string",children:"'package:imei_getter/imei_getter.dart'"})}),(0,s.jsx)(t.span,{className:"token punctuation",children:";"}),"\n\n",(0,s.jsx)(t.span,{className:"token comment",children:"// Request permission first"}),"\n",(0,s.jsx)(t.span,{className:"token keyword",children:"await"})," ",(0,s.jsx)(t.span,{className:"token class-name",children:"ImeiGetter"}),(0,s.jsx)(t.span,{className:"token punctuation",children:"."}),(0,s.jsx)(t.span,{className:"token function",children:"requestPermission"}),(0,s.jsx)(t.span,{className:"token punctuation",children:"("}),(0,s.jsx)(t.span,{className:"token punctuation",children:")"}),(0,s.jsx)(t.span,{className:"token punctuation",children:";"}),"\n\n",(0,s.jsx)(t.span,{className:"token comment",children:"// Get the best available ID"}),"\n",(0,s.jsx)(t.span,{className:"token class-name",children:"String"})," id ",(0,s.jsx)(t.span,{className:"token operator",children:"="})," ",(0,s.jsx)(t.span,{className:"token keyword",children:"await"})," ",(0,s.jsx)(t.span,{className:"token class-name",children:"ImeiGetter"}),(0,s.jsx)(t.span,{className:"token punctuation",children:"."}),(0,s.jsx)(t.span,{className:"token function",children:"getImei"}),(0,s.jsx)(t.span,{className:"token punctuation",children:"("}),(0,s.jsx)(t.span,{className:"token punctuation",children:")"}),(0,s.jsx)(t.span,{className:"token punctuation",children:";"}),"\n"]})}),"\n",(0,s.jsx)(t.h2,{children:"Hashtags"}),"\n",(0,s.jsx)(t.p,{children:"#Flutter #Android #iOS #MobileDev #Identity #Hardware"})]})}t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.jsx)(d,Object.assign({},e,{children:(0,s.jsx)(u,e)}))}},1151:function(e,t,n){"use strict";n.d(t,{ah:function(){return r}});var s=n(7294);let i=s.createContext({});function r(e){let t=s.useContext(i);return s.useMemo(()=>"function"==typeof e?e(t):{...t,...e},[t,e])}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=4464)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.