ChatGPT is a large language model developed by OpenAI. It’s based on the GPT (Generative Pretrained Transformer) architecture and is trained on a large corpus of text data to generate natural language responses to prompts. How to get ChatGPT API key To get an API key for the OpenAI API, you’ll need to sign up for an account on the OpenAI website. Once you’ve created an account, you can generate an API key in the API dashboard. You’ll need to use this API key when making API requests to authenticate and authorize your access to the API. Keep in mind…
-
-
Android Jetpack Compose is a modern UI toolkit introduced by Google for creating native Android apps. It is built with the goal of simplifying the process of building user interfaces while also promoting a more efficient, reactive, and declarative approach. Introduction Android Jetpack Compose is a modern, reactive framework for building user interfaces in Android applications. It was introduced by Google in 2020 and has since become a popular choice among Android developers. The framework provides a more concise and expressive way to build UI compared to traditional Android UI frameworks like XML-based layouts. Compose is built with a focus…
-
In this article, we are going to learn how to make simple Calculator android and ios application using flutter. For this purpose we are using two library which are given below. material.dart math_expressions.dart First library is used in any flutter application for GUI purpose, and second one is used for maths expression solve. In pubspec.yaml file you have to add following library. dependencies: flutter: sdk: flutter # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.3 math_expressions: ^2.0.0 Now click on pub upgrade on upper side. For…
-
Android Studio’s Project and editor windows I introduced Android Studio’s main window at the end of Part 1. This window is divided into several areas, including a Project window where you identify an app’s resource files, and various editor windows where you’ll write the code and specify resources for mobile apps in Android Studio. The Project window and an editor window are shown in Figure 1. The Project window highlights W2A, which is the name of the app’s W2A.java source file (although the .java file extension isn’t shown). Corresponding to W2A is an editor window, reached by double-clicking W2A in the Project window. The editor window reveals the…
-
Installing Android Studio on 64-bit Windows 10 I launched android-studio-ide-181.5056338-windows.exe to start the installation process. The installer responded by presenting the Android Studio Setup dialog box shown in Figure 1. Clicking Next took me to the following panel, which provides the option to decline installing an Android Virtual Device (AVD). I chose to keep the default settings. After clicking Next, I was taken to the Configuration Settings panel, where I was asked to choose where to install Android Studio. I kept the default installation location and clicked Next, and was greeted with the Choose Start Menu Folder panel. I kept the default setting and clicked Install. The following Installing panel appeared: Clicking Show details causes the names…
-
Before you dive deeper into Kotlin’s features, go back to DetailActivityKotlin.kt and replace the contents of the file with the following: package com.tejsumeru.android.omgandroid import android.content.Intent import android.os.Bundle import android.support.v4.view.MenuItemCompat import android.support.v7.app.AppCompatActivity import android.view.Menu import android.widget.ImageView import android.support.v7.widget.ShareActionProvider import com.squareup.picasso.Picasso class DetailActivityKotlin : AppCompatActivity() { private val imageUrlBase = "http://covers.openlibrary.org/b/id/" private var imageURL = "" private var shareActionProvider: ShareActionProvider? = null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_detail) actionBar?.setDisplayHomeAsUpEnabled(true) val imageView = findViewById<ImageView>(R.id.img_cover) val coverId = this.intent.extras.getString("coverID") val len = coverId?.length ?: 0 if (len > 0) { imageURL = imageUrlBase + coverId + "-L.jpg" Picasso.with(this).load(imageURL).placeholder(R.drawable.img_books_loading).into(imageView) } } private fun setShareIntent() { val…
-
Animation is a method in which a collection of images are combined in a sepecific way and processed then they appear as moving images. Building animations make on-screen objects seems to be alive. Android has quite a few tools to help you create animations with relative ease. so in this article we will learn to create animations using Kotlin. below are some attributes which we are using while writing the code in xml. Table of Attributes : XML ATTRIBUTES DESCRIPTION android:duration It is used to specify the duration of animation to run android:fromAlpha It is the starting alpha value for…
-
In this tutorial, we are going to see how to use Retrofit HTTP client in your Android application. Retrofit is an awesome type-safe HTTP client for Android and Java built by awesome folks at Square. Retrofit makes it easy to consume JSON or XML data which is parsed into Plain Old Java Objects (POJOs). So, without any further delays, lets get started by first creating a new project in Android Studio. 1.Go to File ⇒ New Project. When it prompts you to select the default activity, select Empty Activity and proceed. 2.Open build.gradle in (Module:app) and add Retrofit, Picasso, RecyclerView, Gson dependencies like this. dependencies { ... compile "com.android.support:cardview-v7:26.1.0" compile…
-
I face this difficulty. In my case when i click on textview which is part of list-view’s custom XML file then the position is right, but when i click on the button which is the part of list-view’s custom XML file then it always gives first position. After i have to decided to perform automatic onItemClick and store all the values of clicked position into another declared variable which is below. See the image i used kotlin language instead of java. I stored all the map values into another variable which is declared above with public access specifier. [Now when i perform operation on Button click i…
-
https://www.youtube.com/watch?v=rEVWb_8XmLU Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap. To solve This Error You Have To Change Only Heap Size Which Is Define In Gradle.Properties file. You Have To Change The HeapSize To 1024m And Rebuild the Project, If The Error Is Not Solved Then You Have To Close The Project And Rebuild It.