Advertisements

Aatul Palandurkar

Posts Tagged ‘Klouds AnCyber Technologies Pvt Ltd

Here is a report on Android Operating System, devices, market share, etc. up to May 2016.

Have a look at the video for the same.

Advertisements
Android Tutorials

Android Tutorials

Objectives :

  • How to spoof GPS location in Marshmallow?
  • How to fake GPS location in Marshmallow?

To spoof / fake GPS location in Marshmallow follow the steps below :

  1. Go to “Settings”
  2. Go to “About phone”
  3. Scroll to the bottom until you see Build Number.
  4. Repeatedly tap it until you unlock “Developer options”
  5. Go back to “Settings”
  6. Right above “About phone”, you will now see “Developer options”.
  7. Look for “Select mock location app”
  8. Click on this to select the app you use to GPS spoof.

 

Subscribe blog for more updates.

Objective :

  • Passing data between activities in Android
  • Passing multiple data between activities in Android
  • Passing array between activities in Android
  • Passing ArrayList between activities in Android
  • Passing ArrayList to another activity in Android
  • Sending data via Intent in Android
  • Sending multiple data via Intent in Android
  • Sending array between activities in Android
  • Sending ArrayList between activities in Android
  • Sending ArrayList to another activity in Android
  • Sending data via Intent and Bundle in Android
  • Sending multiple data via Intent and Bundle in Android
  • Passing array between activities in Android using Intent and Bundle
  • How to pass array to another activity in Android?
  • How to pass array between activities in Android?
  • How to pass data to another activity in Android?
  • How to pass data to activity in Android?
  • How to pass data to between activities in Android?
  • How to pass ArrayList to another activity in Android?
  • How to pass ArrayList between activities in Android?

 

Code for passing data between activities in Android :

ActivityOne.java


String value = "Hello!";
Intent in = new Intent(this,ActivityTwo.class);
in = putExtra("Key", value);
startActivity(in);

ActivityTwo.java


Bundle bundle = getIntent().getExtras();
String valueReceived = bundle .getString("Key");

 

Code for passing multiple data or values between activities in Android :

Method 1 : Using Intent to pass data and Bundle to extract data between activities in Android

ActivityOne.java


String value1 = "Hello!";
String value2 = "Hi!";
Intent in = new Intent(this,ActivityTwo.class); 
in = putExtra("Key1", value1); startActivity(in); 
in = putExtra("Key2", value2); startActivity(in); 

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
String valueReceived1 = bundle .getString("Key1");
String valueReceived2 = bundle .getString("Key2");

 

Method 2 : Using Bundle to pass and to extract data between activities in Android

ActivityOne.java


String value1 = "Hello!";
String value2 = "Hi!";
Intent in = new Intent(this,ActivityTwo.class); 
Bundle bundle = new Bundle();
bundle.putString("Key1", value1);
bundle.putString("Key2", value2);
in = putExtras(bundle); 
startActivity(in); 

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
String valueReceived1 = bundle .getString("Key1");
String valueReceived2 = bundle .getString("Key2");

 

Code for passing array between activities in Android :

ActivityOne.java

String[] array = new String[]{"Item1", "Item2", "item3", "Item4", "item5"};
Intent in = new Intent(this,ActivityTwo.class); 
Bundle bundle = new Bundle();
bundle.putStringArray("MyArray", array);
in = putExtras(bundle); 
startActivity(in); 

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
String arrayReceived[] = bundle.getStringArray("MyArray");

 

Code for passing ArrayList between activities in Android :

ActivityOne.java

ArrayList<String> array = new ArrayList<String>();
array.add("Hello");
array.add("Hi");
array.add("Bye");
Intent intent = new Intent(this, ActivityTwo.class);
intent.putExtra("array_list", array);
startActivity(intent);

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
ArrayList<String> array = (ArrayList<String>) bundle.getStringArrayList("array_list");


		
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Objectives :

  • Write a Java program to find prime number upto N number
  • Write a Java program to print prime number upto N number
  • Write a Java program to find prime number upto N number using Command Line Arguments
  • Write a Java Program to find prime number upto N number via Command Line Arguments
  • Write a Java program to find prime number upto N number using Scanner class

 

Java Program / Code :

Method 1 : Java Program to find Prime Number upto N number using Scanner class


import java.util.Scanner;
class PrimeNumber
{
public static void main(String[] args)
{
int n,p;
Scanner s=new Scanner(System.in);
System.out.println(“Enter number : ”);
n=s.nextInt();
for(int i=2;i<n;i++)
{
p=0;
for(int j=2;j<i;j++)
{
if(i%j==0)
p=1;
}
if(p==0){
System.out.println(i);
}
}
}
}

Method 2 : Java Program to find Prime Number upto N number using Scanner class and writing function to find prime number

Method isPrime() for checking if a number is prime or not

public class PrimeNumber{
 public boolean isPrime(int num) {
 if ( num < 2 ){
 return false;
 }
 for (int i = 2; i <= Math.sqrt(num); i++) {
 if ( num % i == 0 ) {
 return false;
 }
 }
 return true;
 }
}


// Mock Test Class to test above code
import java.util.Scanner;

public class Demo
{
 public static void main(String[] args) 
 {
 Scanner scanner = new Scanner(System.in);

 System.out.println("Please enter a number: ");
 int num = scanner.nextInt();
 
 if ( num < 2 ) {
 System.out.println("\n There are no Prime Numbers available");
 System.exit(0);
 }
 System.out.println("\n Prime Numbers from 1 to "+ num);
 PrimeNumber primeNum = new PrimeNumber();

 for (int i = 3; i <= num; i++) {
 if ( primeNum.isPrime(i) ) {
 System.out.print(", " + i);
 }
 }
 } 
}

Method 3 : Java Program to find Prime Number upto N number using Command line input


class PrimeNumber
{
public static void main(String[] args)
{
int n,p;
n=Integer.parseint(args[0]);
for(int i=2;i&lt;n;i++)
{
p=0;
for(int j=2;j&lt;i;j++)
{
if(i%j==0)
p=1;
}
if(p==0){
System.out.println(i);
}
}
}
}

Steps to run above program via command line :

  1. Compilation : C:\JavaPrograms>javac PrimeNumber.java
  2. Interpretation : C:\JavaPrograms>java PrimeNumber 20

Output :

2

3

5

7

11

13

17

19

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Ringing-Bells-Freedom-2513

Register Now to Buy Freedom 251 Mobile Phone: Cheapest Smartphone Launched by Ringing Bells Booking starting on – 18 Feb 2016

Ringing Bells has launched the cheapest Smartphone Freedom 251 in India which is priced Rs 251. The company launched this phone on February 17, 2016. The phone is launched by Union Defence Minister Manohar Parrikar. The freedom 251 is queued with the Prime Minister Narendra Modi’s vision of empowering India. The is aimed at providing people Freedom to Flaunt, Freedom to Capture, Freedom to Connect, Freedom to Explore and Freedom to Talk.

Latest NEWS about Freedom 251 Mobile Phone:

The Online Freedom 251 Mobile sale is stopped today because of heavy traffic on the site, the company decide to resume to Online Mobile booking by tomorrow on 19th Feb 2016. It is not confirmed news but hope for the best and visit the page again to check the available option for Freedom 251 registration. If you have any more news about Freedom 251 mobile phone then use comment section to give inputs.

Still it is  unclear that whether Ringbell Freedom 251 will be available on Paytm, Flipkart, Snapdeal or Amazon.com. We will update you if the Smartphone will be available for sale online on said sites. Meanwhile you can register for Freedom 251 on the given below link so you can cross the first step.

Freedom 251 Customer Care Number

0120-4200470, 6619680, 4001000

What is the next Freedom 251 Booking Timing and Launch Date

Mobile launched on 18 Jan 2016 but due to heavy traffic on site it postponed to tomorrow on 19 Feb 2016. Hopefully everything will be alright and again mobile will be ready for registration or buying.

Sale starts on 18th Feb 2016

New booking date – 19th Feb 2016

Closing on – 21st Feb 2016 at 8 PM

The government Mobile Freedom 251 was unveiled in grand ceremony on 17 Feb 2016 by Shri Manohar Parrikar. The mobile development got full support from Shri Narendra Modi government under the Make in India yojana. The phone comes with one year additional warranty.

How to buy Freedom 251 Mobile Phone

Visit the freedom251.com from your internet enabled mobile/laptop and click the buy button given on the site. Rest procedure is very simple, just have to put the right information, you used to provide on the online shopping sites like Flipkart, amazon, Ebay, Paytm and Shopclues.

Registration of Mobile is starting 18 Feb 2016 at 6 PM. so Buy Freedom 251 Mobile – Click here to register

Buy Online Freedom 251 on Amazon/ Flipkart, Launched by Ringing Bells on Wednesday 17 February 2016, Cheapest Smartphone on Amazon/ Flipkart   

Ringing Bells Freedom 251 Specs:  The 1.3 GHz Quadcore Processor of Freedom 251 gives you fast and responsive performance. The phone has enough storage space of 1GB RAM and 8GB internal memory. It supports SD card which is expandable up to 32 GB. The 1450 mAh battery of the Smartphone gives you enough time without charging in between to use the mobile phone for talking, watching video or playing games. The 4 inch Smartphone has HD display and it gives you freedom to watch videos, images and to play games. The 3.2 Mega Pixel auto focus camera and 0.3 Mega Pixel front camera gives you freedom to capture images and have facility to take Selfie in reliable cost of the Smartphone. You will remain connected to your family and friends anytime and anywhere.

Flipkart Freedom 251– Available Soon  

Ebay Freedom 251 Mobile – Not Available

Paytm Freedom 251 Cellphone – Not Available

Amazon Freedom 251– Available Soon

You get 1 year of warranty on Freedom 251, the cheapest Smartphone manufactured in India. There are more than 650 service centres present across India. Dual SIM, front camera, 3G GSM and many more features are available in Smartphone at only Rs 250. You can enjoy the freedom through the lowest price Smartphone.

Freedom 251 Mobile Price in India – Rs 251 Only

Once Freedom 251 Phone available online, we will let you the procedure to How to buy Freedom 251 Mobile Phone from Flipkart, Snapdeal, Amazon India & Paytm.com. Till then wait for news. Just log on the freedom251.com and buy this cheapest mobile.

Source : Promo Coders


Advertisements

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 8,341 other followers

Tweets

%d bloggers like this: