Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Saturday, February 3, 2018

Helpful sites while publishing android apps

Here are the list of sites I usually refer while publishing apps on play store :

1) Design your app icon : https://romannurik.github.io/AndroidAssetStudio/

2) Design your app feature graphic : https://www.norio.be/android-feature-graphic-generator/

3) Step by step guide to publish application :
                                                    https://developer.android.com/studio/publish/preparing.html 

Saturday, January 27, 2018

Lenovo android phone not visible on android studio

My Lenovo K6 power was not visible on device chooser window. I did enable the developer option and usb debugging option. Even after that my phone was not visible on Android studio device chooser window. Then finally I followed following link and it worked :

https://lenovomobilesupport.lenovo.com/in/en/solutions/ht502856

Saturday, December 2, 2017

Tez app by Google

I recently used Tez app by google for UPI. UPI is Unified Payments Interface (UPI) it is a system that powers multiple bank accounts into a single mobile application. 

There are mayUPI app currently on play store :

1) BHIM : https://play.google.com/store/apps/details?id=in.org.npci.upiapp
2) Paytm : https://play.google.com/store/apps/details?id=net.one97.paytm (Paytm integrated bhim to its app)
3) All the bank upi apps.
4) TEZ : UPI app by google https://g.co/tez/Sk34J

Good thing about TEZ is that they are offering huge cashbacks. So install the app using the above link and get Rs 51. Plus after every tranfer (> 500 Rs) you get a scratch card which can give you any amount between 0 to 100000.

So install the app and enjoy the cashbacks.
 

Friday, February 10, 2017

Measuring earth gravity using android phone source code

Following is the complete source code for earth gravity measurement app :
activity_main.xml :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"    
android:layout_width="match_parent"    
android:layout_height="match_parent"    
android:paddingBottom="@dimen/activity_vertical_margin"    
android:paddingLeft="@dimen/activity_horizontal_margin"    
android:paddingRight="@dimen/activity_horizontal_margin"    
android:paddingTop="@dimen/activity_vertical_margin"    
tools:context="com.example.naveenj.sensor.MainActivity">
<TextView        
android:layout_width="wrap_content"        
android:layout_height="wrap_content"        
android:textAppearance="?android:attr/textAppearanceLarge"        
android:text="Large Text"        
android:id="@+id/textView"        
android:layout_marginLeft="75dp"        
android:layout_marginStart="75dp"        
android:layout_marginTop="131dp" />
</RelativeLayout>


This just contains a TextView where we printout the sensor output.

MainActivity.Java :


package com.example.naveenj.sensor;

import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity implements SensorEventListener{

    Sensor acc;
    SensorManager sm;
    TextView t;
    @Override    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        sm = (SensorManager)getSystemService(SENSOR_SERVICE);
        acc = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
        sm.registerListener(this, acc, SensorManager.SENSOR_DELAY_NORMAL);
        t = (TextView)findViewById(R.id.textView);
    }

    @Override    public void onSensorChanged(SensorEvent event) {
        t.setText("X: "+event.values[0]+"Y" + event.values[1]+"z"+
                     event.values[2]+event.toString());
    }

    @Override    public void onAccuracyChanged(Sensor sensor, int accuracy) {

    }
}

MainActivity class implements the interface SensorEventListener. 
This interface has 2 function : 
 1) onSensorChanged
 2) onAccuracyChanged

we then register our main activity class to receive events from sensor 
using SensorManager.

when placed idle phone's z-axis will show earth's gravity.
  

Wednesday, January 25, 2017

Interesting android codes

Dial these codes from android phone to see the results.

Following are the secret codes for you. Please read the subsequent result before trying them out, since a few codes are meant to wipe your entire system, pressing which you can lose your valuable data.
*#*#4636#*#* Display information about Phone, Battery and Usage statistics
*#*#7780#*#* Resetting your phone to factory state-Only deletes application data and applications
*2767*3855# It's a complete wiping of your mobile also it reinstalls the phones firmware
*#*#34971539#*#* Shows completes information about the camera
*#*#7594#*#* Changing the power button behavior-Enables direct poweroff once the code enabled
*#*#273283*255*663282*#*#* For a quick backup to all your media files
*#*#197328640#*#* Enabling test mode for service activity*#*#232339#*#* OR *#*#526#*#* Wireless Lan Tests
 *#*#232338#*#* Displays Wi-Fi Mac-address
*#*#1472365#*#* For a quick GPS test
*#*#1575#*#* A Different type GPS test
*#*#0283#*#* Packet Loopback test
*#*#0*#*#* LCD display test
*#*#0673#*#* OR *#*#0289#*#* Audio test
*#*#0842#*#* Vibration and Backlight test
*#*#2663#*#* Displays touch-screen version
*#*#2664#*#* Touch-Screen test
*#*#0588#*#* Proximity sensor test
*#*#3264#*#* Ram version
*#*#232331#*#* Bluetooth test
*#*#232337#*#* Displays bluetooth device address
*#*#8255#*#* For Google Talk service monitoring
*#*#4986*2650468#*#* PDA, Phone, Hardware, RF Call Date firmware info
*#*#1234#*#* PDA and Phone firmware info
*#*#1111#*#* FTA Software version
*#*#2222#*#* FTA Hardware version
*#*#44336#*#* Displays Build time and change list number
*#06#Displsys IMEI number
*#*#8351#*#* Enables voice dialing logging mode
*#*#8350#*#*Disables voice dialing logging mode

Friday, January 13, 2017

Best resource to learn Android

Android tutorial series by  ProgrammingKnowledge (https://www.youtube.com/channel/UCs6nmQViDpUw0nuIx9c_WvA) is one of the best tutorials I found on internet.

Link to video series : https://youtu.be/EknEIzswvC0?list=PLS1QulWo1RIbb1cYyzZpLFCKvdYV_yJ-E


Here are the steps I followed to make my first app :
  • Download Android studio : Android studio makes your life easier as android developer. It is far more user friendly than eclipse.
  • Follow any video tutorial series : I followed this one :



  • A lot of help came from Stack Overflow : There is a treasure of codes and questions and answers for android here. Feel free to ask questions if you feel that your doubt is unique.
  • A lot of free high quality codes present at github are a great help too.
  • Mother of all resources : https://developer.android.com/reference/classes.html
  • Google is your friend.
  • Feel free to inbox me if you have any other doubt.