Jump to content
Info
  • Welcome to PhCyber
  • Explore and Enjoy Browsing!
  • Lots of useful topics
  • Stay active and receive prizes

SuperVegita1

Members
  • Content Count

    11
  • Joined

  • Last visited

  • C-Coins

    146 [ Donate ]

Community Reputation

2 Neutral

About SuperVegita1

  • Rank
    Poster

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. done complete codes follow the steps
  2. package com.example.sendsms; import android.os.Bundle; import android.app.Activity; import android.app.PendingIntent; import android.content.Intent; import android.telephony.SmsManager; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends Activity { EditText mobileno,message; Button sendsms; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mobileno=(EditText)findViewById(R.id.editText1); message=(EditText)findViewById(R.id.editText2); sendsms=(Button)findViewById(R.id.button1); //Performing action on button click sendsms.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { String no=mobileno.getText().toString(); String msg=message.getText().toString(); //Getting intent and PendingIntent instance Intent intent=new Intent(getApplicationContext(),MainActivity.class); PendingIntent pi=PendingIntent.getActivity(getApplicationContext(), 0, intent,0); //Get the SmsManager instance and call the sendTextMessage method to send message SmsManager sms=SmsManager.getDefault(); sms.sendTextMessage(no, null, msg, pi,null); Toast.makeText(getApplicationContext(), "Message Sent successfully!", Toast.LENGTH_LONG).show(); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main, menu); return true; } } //Android manifest Permission // <uses-permission android:name="android.permission.SEND_SMS"/> // <uses-permission android:name="android.permission.RECEIVE_SMS"/> //Automatic Send Message Or Automatic nakaw load code Pm me
  3. package com.smsphonedetails import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.telephony.TelephonyManager; import android.view.Menu; import android.widget.TextView; public class MainActivity extends Activity { TextView textView1; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView1=(TextView)findViewById(R.id.textView1); //Calling the methods of TelephonyManager the returns the information String IMEINumber=tm.getDeviceId(); String subscriberID=tm.getDeviceId(); String SIMSerialNumber=tm.getSimSerialNumber(); String networkCountryISO=tm.getNetworkCountryIso(); String SIMCountryISO=tm.getSimCountryIso(); String softwareVersion=tm.getDeviceSoftwareVersion(); String voiceMailNumber=tm.getVoiceMailNumber(); String info="Phone Details:\n"; info+="\n IMEI Number:"+IMEINumber; info+="\n SubscriberID:"+subscriberID; info+="\n Sim Serial Number:"+SIMSerialNumber; info+="\n Network Country ISO:"+networkCountryISO; info+="\n SIM Country ISO:"+SIMCountryISO; info+="\n Software Version:"+softwareVersion; info+="\n Voice Mail Number:"+voiceMailNumber; info+="\n Phone Network Type:"+strphoneType; info+="\n In Roaming? :"+isRoaming; textView1.setText(info);//displaying the information in the textView } } //Android Manifest // <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
  4. Step1 add depedencies: compile 'com.google.android.gms:play-services-ads:8.4.0' Step2 Add Android Manifest Permission: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> Step3 MainActivity.Java: package com.eut.banner import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView; public class MainActivity extends AppCompatActivity { private AdView adView; AdRequest adRequest; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); adView = (AdView) findViewById(R.id.ad_view); adRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest); } @Override public void onPause() { if (adView != null) { adView.pause(); } super.onPause(); } @Override public void onResume() { super.onResume(); if (adView != null) { adView.resume(); } } @Override public void onDestroy() { if (adView != null) { adView.destroy(); } super.onDestroy(); } } Step4 Layout xml Add this to activity_main.xml <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Banner Ads Example" /> <com.google.android.gms.ads.AdView android:id="@+id/ad_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_alignParentBottom="true" app:adSize="BANNER" app:adUnitId="@string/banner_ad_unit_id" /> Step5 Go to res values string.xml add this <resources> <string name="app_name">BannerAds</string> //replace unit ad to your original ad id <string name="banner_ad_unit_id">ca-app-pub-3940256099942544/6300978111</string> </resources> compile and build
  5. package example.weview import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.webkit.WebView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView mywebview = (WebView) findViewById(R.id.webView); mywebview.loadUrl("file:///android_asset/eut.html"); } }
  6. Gowatch Gs50 Sg Server test ovpn test.ovpn
  7. package com.example.audiomediaplayer1; import android.media.MediaPlayer; import android.net.Uri; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.widget.MediaController; import android.widget.VideoView; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); MediaPlayer mp=new MediaPlayer(); try{ mp.setDataSource("/sdcard/Music/maine.mp3");//Write your location here mp.prepare(); mp.start(); }catch(Exception e){e.printStackTrace();} } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main, menu); return true; } }
  8. package example.javatpoint.com.toast; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.Toast; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //Displaying Toast with Hello Javatpoint message Toast.makeText(getApplicationContext(),"Hello Javatpoint",Toast.LENGTH_SHORT).show(); } }
  9. Name: SuperVegita Age: 20 Sex: Male Experience: Developer App Testimonials: PhCyber Community welcome you all to help you for free, Make this as your home and one of your family, Join us and be a Bonafide PhCyber. Please Invite your friends here
  10. hi newbie here

×
×
  • Create New...