Android Studio Splash screen disappearing before activity start - java

I have problem with splash screen. It shows only for half a second and disappears a few seconds before activity HomeZastepowy appears. I made this splash screen based on this site https://android.jlelse.eu/right-way-to-create-splash-screen-on-android-e7f1709ba154. Where i made a mistake?
MainActivity code:
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.firestore.DocumentReference;
import com.google.firebase.firestore.DocumentSnapshot;
import com.google.firebase.firestore.FirebaseFirestore;
import java.util.Objects;
public class MainActivity extends AppCompatActivity {
FirebaseAuth mAuth;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mAuth = FirebaseAuth.getInstance();
if (mAuth.getCurrentUser() != null) {
String uid = mAuth.getUid();
final DocumentReference mDocRef = FirebaseFirestore.getInstance().collection("Data").document("userInfo").collection(Objects.requireNonNull(uid)).document(uid);
mDocRef.get()
.addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {
#Override
public void onSuccess(DocumentSnapshot documentSnapshot) {
if (documentSnapshot.exists()) {
String user = documentSnapshot.getString("user");
assert user != null;
if (user.equals("user")) {
Log.d("tag", String.valueOf(mAuth.getUid()));
Intent intent = new Intent(getApplicationContext(),
HomeUsrActivity.class);
startActivity(intent);
finish();
} else {
Log.d("tag", "Zastepowy");
Log.d("tag", String.valueOf(mAuth.getUid()));
startActivity(new Intent(MainActivity.this, HomeZastepowy.class));
finish();
}
}
}
}).addOnFailureListener(new OnFailureListener() {
#Override
public void onFailure(#NonNull Exception e) {
Toast.makeText(MainActivity.this, "Error", Toast.LENGTH_SHORT).show();
}
});
finish();
}else {
Intent intent = new Intent(getApplicationContext(),
HomeActivity.class);
startActivity(intent);
finish();
}
}
}
AndroidManifest code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.zapp4">
<application
android:allowBackup="true"
android:fullBackupContent="#xml/backup_descriptor"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".HomeUsrActivity"></activity>
<activity android:name=".LoginActivity" />
<activity android:name=".punktyog" />
<activity android:name=".punktywz" />
<activity android:name=".HomeZastepowy" />
<activity android:name=".tradycje" />
<activity android:name=".wiedza" />
<activity android:name=".kontakt" />
<activity android:name=".zastepy" />
<activity android:name=".historia" />
<activity android:name=".onas" />
<activity android:name=".HomeActivity" />
<activity android:name=".MainActivity" android:theme="#style/SplashScreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

I think the problem is that you forgot to remove this line from your code:
setContentView(R.layout.activity_main)
Because you setContentView, it overrides your theme background. So try to comment this line and give it a try.

Related

Unable to find explicit activity class java

i am a new app developer i was working on a app for the past few days i have implemented onclicklistner in my program then the error shows like this.i have been working on a cardview project please help me from this and i am using new version of andriod.
thank you
this is my Main activity:
package com.example.login;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.os.Handler;
import android.os.Handler;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private static int SPLASH_SCREEN = 4000;
private CardView d1,d2,d3,d4;
//varaibles
Animation topAnim, bottomAnim;
ImageView image;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
d1 = (CardView) findViewById(R.id.d1);
d2 = (CardView) findViewById(R.id.d2);
d3 = (CardView) findViewById(R.id.d3);
d4 = (CardView) findViewById(R.id.d4);
d1=null;
d2=null;
d3=null;
d4=null;
try {
d1.setOnClickListener((OnClickListener) this);
d2.setOnClickListener((OnClickListener) this);
d3.setOnClickListener((OnClickListener) this);
d4.setOnClickListener((OnClickListener) this);
}catch (NullPointerException ignored){
}
//Animation
topAnim = AnimationUtils.loadAnimation(this, R.anim.top_animation);
bottomAnim = AnimationUtils.loadAnimation(this, R.anim.bottom_animation);
//Hooks
image = findViewById(R.id.imageView);
image.setAnimation(topAnim);
new Handler().postDelayed(new Runnable() {
#Override
public void run() {
Intent intent = new Intent(MainActivity.this,dashboard2.class);
startActivity(intent);
finish();
}
}, SPLASH_SCREEN);
}
#Override
public void onClick(View v){
Intent i;
switch (v.getId()){
case R.id.d1: i = new Intent(this,d1.class); startActivity(i); break;
case R.id.d2: i = new Intent(this,d2.class); startActivity(i); break;
case R.id.d3: i = new Intent(this,d3.class); startActivity(i); break;
case R.id.d4: i = new Intent(this,d4.class); startActivity(i); break;
}
}
}
this is my Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.login">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Login">
<activity
android:name=".d4"
android:exported="false" />
<activity
android:name=".d3"
android:exported="false" />
<activity
android:name=".d1"
android:exported="false" />
<activity
android:name=".d2"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
this is my logcat:
```Process: com.example.login, PID: 16401
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.login/com.example.login.dashboard2}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1933)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1616)
at android.app.Activity.startActivityForResult(Activity.java:4487)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:597)
at android.app.Activity.startActivityForResult(Activity.java:4445)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:583)
at android.app.Activity.startActivity(Activity.java:4806)
at android.app.Activity.startActivity(Activity.java:4774)
at com.example.login.MainActivity$1.run(MainActivity.java:61)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
enter code here
Activity dashboard2 is not declared in your Manifest
Solution: Add below tag in your Manifest
<activity
android:name=".dashboard2"
android:exported="false" />

why can't i get my call recording app to work?

I'm trying to implement an app that allows me to record the audio of calls, activating the service via a toggle button. I can't figure out what is wrong with my code as once I set the toggle button to ON and initiate the call, there is no file saved.
I don't understand if the problem is in saving (maybe I'm looking for the file in the wrong directory?), Or in the fact that it doesn't actually record.
I'm using AndroidStudio 4.0 and i'm trying my app on my Samsung S9.
Thanks in andvance for helping !
RecordService.java
package com.example.registrachiamate;
import android.app.MediaRouteButton;
import android.app.Service;
import android.content.Intent;
import android.media.MediaRecorder;
import android.os.Environment;
import android.os.IBinder;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.text.format.DateFormat;
import java.io.File;
import java.io.IOException;
import java.util.Date;
public class RecordService extends Service {
private MediaRecorder rec;
private File file;
#Override
public IBinder onBind(Intent intent) {
return null;
}
#Override
public int onStartCommand(Intent intent, int flags, int startId) {
//return super.onStartCommand(intent, flags, startId);
file= Environment.getExternalStorageDirectory();
Date date=new Date();
CharSequence sdf= DateFormat.format("MM-dd-yy-hh-mm--ss",date.getTime());
rec=new MediaRecorder();
rec.setAudioSource(MediaRecorder.AudioSource.MIC);
rec.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
rec.setOutputFile(file.getAbsolutePath()+"/"+sdf+"rec.3gp");
rec.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
TelephonyManager manager=(TelephonyManager) getApplicationContext().getSystemService(getApplicationContext().TELEPHONY_SERVICE);
assert manager != null;
manager.listen(new PhoneStateListener(){
#Override
public void onCallStateChanged(int state, String phoneNumber) {
//super.onCallStateChanged(state, phoneNumber) {
if (TelephonyManager.CALL_STATE_IDLE==state){
rec.stop();
rec.reset();
rec.release();
stopSelf();
}else if(TelephonyManager.CALL_STATE_OFFHOOK==state && rec==null){
try {
rec.prepare();
} catch (IOException e) {
e.printStackTrace();
}
rec.start();
}
}
},PhoneStateListener.LISTEN_CALL_STATE);
return START_STICKY;
}
}
ActivityButton1.java
package com.example.registrachiamate;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import android.widget.ToggleButton;
import androidx.appcompat.app.AppCompatActivity;
public class ActivityButton1 extends AppCompatActivity {
ToggleButton startandoff;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.button1);
startandoff=(ToggleButton)findViewById(R.id.toggleButton);
}
public void tooglebutton(View view)
{
boolean checked=((ToggleButton)view).isChecked();
if (checked){
Intent intent=new Intent(this,RecordService.class);
startService(intent);
Toast.makeText(getApplicationContext(),"Call Record STARTED",Toast.LENGTH_SHORT).show();
}else {
Intent intent=new Intent(this,RecordService.class);
stopService(intent);
Toast.makeText(getApplicationContext(),"Call Record STOPPED",Toast.LENGTH_SHORT).show();
}
}
}
AndroidManifest.xml, if i put the RecordService, in it stops running
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.registrachiamate">
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.NEW_OUTGOING_CALL"/>
<action android:name="android.intent.action.PHONE_STATE"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ActivityButton1"></activity>
<activity android:name=".ActivityButton2"></activity>
<activity android:name=".ActivityButton3"></activity>
<activity android:name=".ActivityButton4"></activity>
<activity android:name=".RecordService"></activity>
</application>
</manifest>

Why the Broadcast receiver is not working dynamicly?

I tried to do a broadcast receiver dynamically for incoming SMS will show a toast but the app doesn't show anything.
I register the broadcast dynamically in the mainActivity like this.
MainActivity.java
package com.example.smsreader;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
BroadcastReader reader = new BroadcastReader();
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
registerReceiver(reader, filter);
}
}
This is brodcast class, the app will show a toast when the phone will receive a SMS but it doesn't
package com.example.smsreader;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;
public class BroadcastReader extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
if("android.provider.Telephony.SMS_RECEIVED".equals(intent.getAction())){
Toast.makeText(context, "it is working", Toast.LENGTH_LONG).show();
}
}
}
I don't register anything in the manifest file.
Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.smsreader">
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Try the following :
intentFilter.addAction("android.provider.Telephony.SMS_RECEIVED");
You need to use the following method for registering local broadcastReceiver ;)
LocalBroadcastManager.getInstance(this).registerReceiver(reader, filter)

Can not go to the next page

I want go to next page(mainActivity). I was able to sign up and send that information to the database. But only the success message and the ok button come out. Errors not come out. plz check my code.
LogingActivity.java
package com.life.registeration;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.toolbox.Volley;
import org.json.JSONObject;
public class LoginActivity extends AppCompatActivity {
private AlertDialog dialog;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
TextView registerButton = (TextView) findViewById(R.id.registerButton);
registerButton.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View view) {
Intent registerIntent = new Intent(LoginActivity.this, RegisterActivity.class);
LoginActivity.this.startActivity(registerIntent);
}
});
final EditText idText = (EditText) findViewById(R.id.idText);
final EditText passwordText = (EditText) findViewById(R.id.passwordText);
final Button loginButton = (Button) findViewById(R.id.loginButton);
loginButton.setOnClickListener(new View.OnClickListener(){
#Override
public void onClick(View view) {
String userID = idText.getText().toString();
String userPassword = passwordText.getText().toString();
Response.Listener<String> responseListener = new Response.Listener<String>(){
#Override
public void onResponse(String response) {
try {
JSONObject jsonResponse = new JSONObject(response);
boolean success = jsonResponse.getBoolean("success");
if(success){
AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
dialog = builder.setMessage("Login success.")
.setPositiveButton("ok", null)
.create();
dialog.show();
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
LoginActivity.this.startActivity(intent);
finish();
}
else{
AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);
dialog = builder.setMessage("please, check your id.")
.setNegativeButton("re try", null)
.create();
dialog.show();
}
}
catch (Exception e) {
e.printStackTrace();
}
}
};
LoginRequest loginRequest = new LoginRequest(userID, userPassword, responseListener);
RequestQueue queue = Volley.newRequestQueue(LoginActivity.this);
queue.add(loginRequest);
}
});
}
#Override
protected void onStop(){
super.onStop();
if(dialog != null){
dialog.dismiss();
dialog = null;
}
}
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.life.registeration">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" /><!-- ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information. -->
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
With answer of Prerak Sola add your Activity on Manifest.xml:
<activity android:name=".MainActivity" />
Use your .setPositiveButton properly , your OK click event is null - .setPositiveButton("ok", null):
.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
startActivity(intent);
}
}).create();
dialog.show();
You have not registered your MainActivity in AndroidManifest.xml file. Add the line <activity android:name=".MainActivity" /> in the manifest file. So it should look like:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.life.registeration">
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity android:name=".MainActivity" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>

My android app is crashing in most devices

The android app I had created is not crashing in the emulator nor the phone I am using but shows some exceptions like java.lang.NoSuchMethodError: in the logcat, but when I transfer the apk file to other devices then 80% of the users reported the app got crashed while just opening the app or opening an activity with on the app.
This is driving me crazy I tested this on different emulators and none of them got crashed.I just couldn't understand what the problem is please help.
MY AndroidMaifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androgeekzz.pokemongo_bestguidetipsandtricks">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Basics" />
<activity android:name=".Tips" />
<activity android:name=".Tricks" />
<activity android:name=".Bas_What" />
<activity android:name=".Bas_Downld" />
<activity android:name=".Bas_Pikatchu" />
<activity android:name=".Bas_PokeCapture" />
<activity android:name=".Bas_LVI5" />
<activity android:name=".Bas_GainXP_LVL_Up" />
<activity android:name=".Bas_All_Iteams" />
<activity android:name=".Bas_All_Places" />
<activity android:name=".Advanced" />
<activity android:name=".Adv_gainXP" />
<activity android:name=".Adv_1candies" />
<activity android:name=".Adv_2Evolution" />
<activity android:name=".Adv_3PowerUp" />
<activity android:name=".Adv_4FightAGym" />
<activity android:name=".Adv_5DefendGym" />
<activity android:name=".Adv_6LvlGym" />
<activity android:name=".Adv_7Type" />
<activity android:name=".Adv_8Egg" />
<activity android:name=".Tips_0Good" />
<activity android:name=".Tips_1Eevee" />
<activity android:name=".Tips_2EarnXP" />
<activity android:name=".Tips_3Find" />
<activity android:name=".Tips_4Nest" />
<activity android:name=".Adv_Nests" />
<activity android:name=".Resources"></activity>
</application>
Main Activity:
package com.androgeekzz.pokemongo_bestguidetipsandtricks;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
public class MainActivity extends AppCompatActivity {
SharedPreferences prefs;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
prefs = getSharedPreferences("myPrefs", MODE_PRIVATE);
int times = prefs.getInt("ok_clicked", 0);
if (times == 0) {
new AlertDialog.Builder(MainActivity.this).setTitle("Hi there user").setMessage("This app version right now is just 1.0 the later versions will be released soon with even more content,Images and in app video tutorials etc..and this app is completely ADD free so please do consider rating it. ").setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
prefs = getSharedPreferences("myPrefs", MODE_PRIVATE);
SharedPreferences.Editor editor = prefs.edit();
editor.putInt("ok_clicked", 1);
editor.apply();
}
}).show();
}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
}
public void basicsOnclick(View view) {
Intent i = new Intent(this, Basics.class);
startActivity(i);
}
public void advanceOnclick(View view) {
Intent i = new Intent(this, Advanced.class);
startActivity(i);
}
public void tipsOnclick(View view) {
Intent i = new Intent(this, Tips.class);
startActivity(i);
}
public void tricksOnclick(View view) {
Intent i = new Intent(this, Tricks.class);
startActivity(i);
}
public void resourceLinksOnclick(View view) {
Intent i = new Intent(this, Resources.class);
startActivity(i);
}
public void aboutOnclick(View view) {
new AlertDialog.Builder(MainActivity.this).setTitle("About").setMessage("App Name :Pokemon GO-Guide\nVersion :1.0 \nCreator :Prudhvi").setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
}).show();
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
this.finish();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}
LogCat (It had not crashed for this log cat)-
at com.android.systemui.statusbar.SignalClusterView.apply(SignalClusterView.java:468)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.refreshViews(NetworkControllerImpl.java:1986)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.refreshViews(NetworkControllerImpl.java:1679)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.onReceive(NetworkControllerImpl.java:643)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:895)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:114)
08-07 23:23:38.730 824-824/?
E/Xposed: java.lang.NoSuchMethodError: com.mediatek.systemui.ext.DefaultStatusBarPlugin#getDataNetworkTypeIconGemini(com.mediatek.systemui.ext.NetworkType,int)#exact
at de.robv.android.xposed.XposedHelpers.findMethodExact(XposedHelpers.java:170)
at de.robv.android.xposed.XposedHelpers.findAndHookMethod(XposedHelpers.java:131)
at com.ceco.lollipop.gravitybox.ModStatusBar$24.afterHookedMethod(ModStatusBar.java:1072)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:689)
at com.mediatek.systemui.ext.PluginFactory.getStatusBarPlugin(<Xposed>)
at com.android.systemui.statusbar.SignalClusterView.apply(SignalClusterView.java:401)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.refreshViews(NetworkControllerImpl.java:1986)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.refreshViews(NetworkControllerImpl.java:1679)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.onReceive(NetworkControllerImpl.java:643)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:895)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:114)
08-07 23:23:38.731 824-824/?
E/Xposed: java.lang.NoSuchMethodError: com.mediatek.systemui.ext.DefaultStatusBarPlugin#getDataNetworkTypeIconGemini(com.mediatek.systemui.ext.NetworkType,int)#exact
at de.robv.android.xposed.XposedHelpers.findMethodExact(XposedHelpers.java:170)
at de.robv.android.xposed.XposedHelpers.findAndHookMethod(XposedHelpers.java:131)
at com.ceco.lollipop.gravitybox.ModStatusBar$24.afterHookedMethod(ModStatusBar.java:1072)
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:689)
at com.mediatek.systemui.ext.PluginFactory.getStatusBarPlugin(<Xposed>)
at com.android.systemui.statusbar.SignalClusterView.getNullIconIdGemini(SignalClusterView.java:557)
at com.android.systemui.statusbar.SignalClusterView.apply(SignalClusterView.java:468)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.refreshViews(NetworkControllerImpl.java:1986)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.refreshViews(NetworkControllerImpl.java:1679)
at com.android.systemui.statusbar.policy.NetworkControllerImpl.onReceive(NetworkControllerImpl.java:643)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:895)
at android.os.Handler.handleCallback(Handler.java:810)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5529)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:114)

Categories

Resources