App Crashing when changing activity - java

My app crashes when changing activity Here is my code,
I was following a tutorial on youtube, Everything seems to be exactly like his code. See if you can help
Everything seems to be inorder, I copyed everything exactly,
Manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="com.example.helloworld.MAINACTIVITY" />
<category android:name="android.intent.category.DEFUALT" />
</intent-filter>
</activity>
</application>
</manifest>
MainActivity:
package com.example.helloworld;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.app.Activity;
public class MainActivity extends Activity {
int counter;
Button add, sub;
TextView display;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
counter = 0;
add = (Button) findViewById(R.id.bAdd);
sub = (Button) findViewById(R.id.bSub);
display = (TextView) findViewById(R.id.tvDisplay);
add.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
counter++;
display.setText("Your Total is " + counter);
}
});
sub.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
counter--;
display.setText("Your Total is " + counter);
}
});
}
}
Splash.java:
package com.example.helloworld;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class Splash extends Activity{
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
} catch (InterruptedException e){
e.printStackTrace();
}finally{
Intent openStartingPoint = new Intent("com.example.helloworld.MAINACTIVITY");
startActivity(openStartingPoint);
}
}
};
timer.start();
}
}
Logcat:
07-19 20:35:36.068: E/AndroidRuntime(1442): FATAL EXCEPTION: Thread-74
07-19 20:35:36.068: E/AndroidRuntime(1442): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.helloworld.MAINACTIVITY }
07-19 20:35:36.068: E/AndroidRuntime(1442): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
07-19 20:35:36.068: E/AndroidRuntime(1442): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
07-19 20:35:36.068: E/AndroidRuntime(1442): at android.app.Activity.startActivityForResult(Activity.java:3190)
07-19 20:35:36.068: E/AndroidRuntime(1442): at android.app.Activity.startActivity(Activity.java:3297)
07-19 20:35:36.068: E/AndroidRuntime(1442): at com.example.helloworld.Splash$1.run(Splash.java:23)

Try changing:
Intent openStartingPoint = new Intent("com.example.helloworld.MAINACTIVITY");
To:
Intent openStartingPoint = new Intent(Splash.this, MainActivity.class);

I think the application crashes because you misspelled "DEFAULT" in the intent-filter.

Related

Android button not opening other class

I have problems with buttons.I have made 2 buttons that will when pressed open other activity(class).In code there is no error but when I launch emulator it just doesn't work and isn't opening those classes.
My button's btnopis and btnpronadi don't work(they are not opening other activity(class)).But I have button exit that Works and closes app. I don't get where the problem is. Here is the code
import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity{
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
izlaz();
}
public Button btnopis;
public void otvoriopis(){
btnopis=(Button)findViewById(R.id.btnopis);
btnopis.setOnClickListener(new Button.OnClickListener() {
#Override
public void onClick(View v) {
Intent otvoriopis= new Intent(MainActivity.this,Opis.class);
startActivity(otvoriopis);
}
});
}
public Button btnpronadi;
public void otvoripronadi(){
btnpronadi=(Button)findViewById(R.id.btnpronadi);
btnpronadi.setOnClickListener(new Button.OnClickListener() {
#Override
public void onClick(View v) {
Intent otvoripronadi= new Intent(MainActivity.this,Pronadi.class);
startActivity(otvoripronadi);
}
});
}
public Button btnizlaz;
public void izlaz(){
btnizlaz=(Button)findViewById(R.id.btnizlaz);
btnizlaz.setOnClickListener(new Button.OnClickListener() {
#Override
public void onClick(View v) {
finish();
System.exit(0);
}
});
}
}
here is the manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.shromid">
<application
android:allowBackup="true"
android:icon="#mipmap/app_ikona"
android:roundIcon="#mipmap/app_icon_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".SplashScreen"
android:label="ShromID"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity"/>
<activity android:name=".Opis" />
<activity android:name=".Pronadi"></activity>
</application>
</manifest>
You forgot do call otvoriopis() and otvoripronadi() at onCreate:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
izlaz();
otvoriopis();
otvoripronadi();
}
You should call your functions in onCreate method, like you did for 'izlaz'

java.lang.NoClassDefFoundError error in android project

i make a project which includes following jars.
in build path as follows
Main.java
public class Main extends Activity
{
public int welcomeScreenDisplay = 1000;
boolean ispr=false;
#Override
protected void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.splash);
/** create a thread to show splash up to splash time */
Thread welcomeThread = new Thread() {
int wait = 0;
#Override
public void run() {
try {
super.run();
while (wait < welcomeScreenDisplay) {
sleep(100);
wait += 100;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
Intent mIntent=new Intent(getApplicationContext(), DrawerActivity .class).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(mIntent);
finish();
}
}
};
welcomeThread.start();
}
}
DrawerActivity.java
package com.pkg.name;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
public class DrawerActivity extends FragmentActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.spinner_year);
}
}
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pkg.name"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="11" />
<application
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/CustomActionBarTheme" >
<activity
android:name="com.pkg.name.Splash"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.pkg.name.DrawerActivity"
android:screenOrientation="portrait"
android:theme="#style/AppBaseTheme"
android:windowSoftInputMode="stateHidden|stateVisible" >
</activity>
</application>
</manifest>
When i run my application in device it give me error like
FATAL EXCEPTION: Thread-912
java.lang.NoClassDefFoundError:com.pkg.name.DrawerActivity
at com.pkg.name.Splash$1.run(Splash.java:53)
Any idea how can i solve this ?your all suggestions are appreciable.

Android: Activity not found to handle intent

I get this error when I run my program. It starts up the first page, but when it's supposed to go to .Menu it crashes:
11-04 06:01:06.039: W/dalvikvm(949): threadid=11: thread exiting with uncaught exception (group=0x414c4700)
11-04 06:01:06.057: E/AndroidRuntime(949): FATAL EXCEPTION: Thread-87
11-04 06:01:06.057: E/AndroidRuntime(949): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.example.secondapp.MENU }
11-04 06:01:06.057: E/AndroidRuntime(949): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1632)
11-04 06:01:06.057: E/AndroidRuntime(949): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
11-04 06:01:06.057: E/AndroidRuntime(949): at android.app.Activity.startActivityForResult(Activity.java:3390)
11-04 06:01:06.057: E/AndroidRuntime(949): at android.app.Activity.startActivityForResult(Activity.java:3351)
11-04 06:01:06.057: E/AndroidRuntime(949): at android.app.Activity.startActivity(Activity.java:3587)
11-04 06:01:06.057: E/AndroidRuntime(949): at android.app.Activity.startActivity(Activity.java:3555)
11-04 06:01:06.057: E/AndroidRuntime(949): at com.example.secondapp.Splash$1.run(Splash.java:26)
Here's my Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.secondapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Menu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAINACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
And here are the .java files of my .Splash activity and my .Menu activity:
Splash
package com.example.secondapp;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
public class Splash extends Activity {
MediaPlayer ourSong;
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
ourSong = MediaPlayer.create(Splash.this, R.raw.happyman);
ourSong.start();
Thread timer = new Thread(){
public void run(){
try{
sleep(5000);
} catch (InterruptedException e){
e.printStackTrace();
}finally{
Intent startMain = new Intent("com.example.secondapp.MENU");
startActivity(startMain);
}
}
};
timer.start();
}
#Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
finish();
}
}
Menu
package com.example.secondapp;
public class Menu extends ListActivity {
String classes[] = {"MainActivity", "example1", "example2", "example3", "example4", "example5"};
#Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(Menu.this, android.R.layout.simple_list_item_1, classes));
}
#Override
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
String Cheese = classes[position];
super.onListItemClick(l, v, position, id);
try{
Class ourClass = Class.forName("com.example.secondapp." + Cheese);
Intent ourIntent = new Intent(Menu.this, ourClass);
startActivity(ourIntent);
}catch(ClassNotFoundException e){
e.printStackTrace();
}
}
}
in your manifest the action should match. Change it with com.example.secondapp.MENU
It is in caps MENU should be Menu
Change to
Intent startMain = new Intent("com.example.secondapp.Menu");
coz your activity is public class Menu extends ListActivity { and in manifest you have
<activity
android:name=".Menu"
Edit:
Explicit intents designate the target component by its name (the
component name field, mentioned earlier, has a value set). Since
component names would generally not be known to developers of other
applications, explicit intents are typically used for
application-internal messages — such as an activity starting a
subordinate service or launching a sister activity.
Implicit intents do not name a target (the field for the component
name is blank). Implicit intents are often used to activate
components in other applications.
So Change to explicit intent
Intent startMain = new Intent(Splash.this,Menu.class); // in Splash.java
and in manifest
<activity
android:name="com.example.secondapp.Menu"
android:label="#string/app_name" >
</activity>
For more info check the docs
http://developer.android.com/guide/components/intents-filters.html
You need to set activity class in your manifest and you misspelled MENU
replace
<activity
android:name=".Menu"
android:label="#string/app_name" >
with
<activity
android:name=".MENU"
android:label="#string/app_name" >

activitythread.performlaunchactivity(activitythread$activityclientrecord intent) source not found

then when i press f8 a i get : ZygoteInit$methodandargscaller.run() source not found
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.copyup"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.copyup.MainActivity"
android:label="copy up" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Game"
android:label="Copy Up">
</activity>
<activity
android:name=".Rules"
android:label="Copy Up!">
</activity>
<activity
android:name=".Scores"
android:label="Copy Up!">
</activity>
<activity
android:name=".LearnCircle"
android:label="Copy Up!">
</activity>
<activity
android:name=".LearnHoriz"
android:label="Copy Up!">
</activity>
<activity
android:name=".LearnVert"
android:label="Copy Up!">
</activity>
<activity
android:name=".LearnMenu"
android:label="Copy Up!">
</activity>
</application>
</manifest>
and my code:
package com.example.copyup;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
public class MainActivity extends Activity {
Button start, rules, hs, learn;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
linktoxml();
start.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(MainActivity.this, Game.class);
MainActivity.this.startActivity(myIntent);
}
});
/*
rules.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(MainActivity.this, Rules.class);
MainActivity.this.startActivity(myIntent);
}
});
hs.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(MainActivity.this, Scores.class);
MainActivity.this.startActivity(myIntent);
}
});
learn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(MainActivity.this, LearnMenu.class);
MainActivity.this.startActivity(myIntent);
}
});*/
//show shape, take reading after 4 seconds, compare with other, if true next, if false, end game
//dont make it complex with time reduce yet!!
}
private void linktoxml() {
start = (Button) findViewById(R.id.bcstart);
rules = (Button) findViewById(R.id.brules);
hs = (Button) findViewById(R.id.bhs);
learn = (Button) findViewById(R.id.blearn);
}
}
I have tried cleaning the project, re-writing the manifest and everything i can possible think of. It works if i comment out the links to the buttons in the code and leave them in the manifest but the moment i uncommnet them i get these errors, please help!!!
The problem is that the activity throw exception.
eclipse looks for the source code in android SDK and can't find it.
Just debug your code and find out where the code throw exception.
solved it, feeling pretty stupid now, needed bstart not bcstart when the button is defined.

Fortumo In-App payment for Android

I'm trying to create a application, where you can buy In-App credits with the Fortumo service. I've managed to get the makePayment(); method working so I can make a payment and everything seems to work. The only thing is, that it looks like the onReceive(); is never called because the credits count is not changed after a successful payment. The credits count should be increased by 32000 with one payment of 0.32€.
Here is the main activity java:
package com.your.raha;
import com.your.raha.R;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.media.AudioManager;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
public class Soundboard extends Activity {
private SoundManager mSoundManager;
static int counter;
static TextView display;
SharedPreferences someData;
public static String filename = "rahafail";
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setVolumeControlStream(AudioManager.STREAM_MUSIC);
setContentView(R.layout.proov);
display = (TextView) findViewById(R.id.tvKonto);
someData = getSharedPreferences(filename, 0);
int returnedInt = someData.getInt("sharedInt", 0);
counter = returnedInt;
mSoundManager = new SoundManager();
mSoundManager.initSounds(getBaseContext());
mSoundManager.addSound(1, R.raw.sound1);
Button SoundButton1 = (Button)findViewById(R.id.sound1);
SoundButton1.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
mSoundManager.playSound(1);
AddOne();
}
});
Button bOsta = (Button)findViewById(R.id.bOsta);
bOsta.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
onStop();
startActivity(new Intent("com.uugudev.rahaboss.FORTUMOMAKSA"));
}
});
ImageButton Abi = (ImageButton)findViewById(R.id.ibAbi);
Abi.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
counter = 0;
SharedPreferences.Editor editor = someData.edit();
editor.putInt("sharedInt", counter);
editor.commit();
display.setText(counter + " EEK");
}
});
}
public static void AddOne() {
// TODO Auto-generated method stub
counter++;
display.setText(counter + " EEK");
}
public static void Osteti() {
// TODO Auto-generated method stub
counter = counter + 32000;
display.setText(counter + " EEK");
}
#Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
SharedPreferences.Editor editor = someData.edit();
editor.putInt("sharedInt", counter);
editor.commit();
}
#Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
SharedPreferences.Editor editor = someData.edit();
editor.putInt("sharedInt", counter);
editor.commit();
}
#Override
protected void onStart() {
// TODO Auto-generated method stub
super.onStart();
int returnedInt = someData.getInt("sharedInt", 0);
counter = returnedInt;
}
#Override
protected void onStop() {
// TODO Auto-generated method stub
super.onStop();
SharedPreferences.Editor editor = someData.edit();
editor.putInt("sharedInt", counter);
editor.commit();
}
#Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
display.setText(counter + " EEK");
}
}
The payment activity class:
package com.your.raha;
import android.os.Bundle;
import android.view.Window;
import android.widget.Toast;
import com.fortumo.android.Fortumo;
import com.fortumo.android.PaymentActivity;
import com.fortumo.android.PaymentRequestBuilder;
import com.fortumo.android.PaymentResponse;
public class FortumoMaksa extends PaymentActivity {
/** Called when the activity is first created. */
public int raha;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Fortumo.enablePaymentBroadcast(this, Manifest.permission.PAYMENT_BROADCAST_PERMISSION);
PaymentRequestBuilder builder = new PaymentRequestBuilder();
builder.setDisplayString("Donate");
builder.setProductName("stars_myawesomeusername");
makePayment(builder.build());
}
;
#Override
protected void onResume() {
super.onResume();
}
#Override
protected void onPaymentCanceled(PaymentResponse response) {
Toast.makeText(this, "Kasutaja katkestas makse", Toast.LENGTH_SHORT).show();
finish();
}
#Override
protected void onPaymentFailed(PaymentResponse response) {
Toast.makeText(this, "Makse ebaõnnestus", Toast.LENGTH_SHORT).show();
finish();
}
#Override
protected void onPaymentPending(PaymentResponse response) {
Toast.makeText(this, "Makse ootel", Toast.LENGTH_SHORT).show();
finish();
}
#Override
protected void onPaymentSuccess(PaymentResponse response) {
Toast.makeText(this, "Makse õnnestus", Toast.LENGTH_SHORT).show();
finish();
}
}
The PaymentStatusReceived class:
package com.your.raha;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.fortumo.android.Fortumo;
public class PaymentStatusReceiver extends BroadcastReceiver {
private static String TAG = "PaymentStatusReceiver";
#Override
public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
int billingStatus = extras.getInt("billing_status");
if(billingStatus == Fortumo.MESSAGE_STATUS_BILLED) {
Soundboard.Osteti();
}
}
}
The AndroidManifest xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.your.raha"
android:installLocation="auto"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<permission
android:name="com.your.domain.PAYMENT_BROADCAST_PERMISSION"
android:label="Read Fortumo payment status"
android:protectionLevel="signature" />
<uses-permission android:name="com.your.raha.PAYMENT_BROADCAST_PERMISSION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<receiver android:name="com.fortumo.android.BillingSMSReceiver" >
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<service android:name="com.fortumo.android.FortumoService" />
<service android:name="com.fortumo.android.StatusUpdateService" />
<activity
android:name="com.fortumo.android.FortumoActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<receiver
android:name=".PaymentStatusReceiver"
android:permission="com.your.raha.PAYMENT_BROADCAST_PERMISSION" >
<intent-filter>
<action android:name="com.fortumo.android.PAYMENT_STATUS_CHANGED" />
</intent-filter>
</receiver>
<activity
android:name="com.fortumo.android.FortumoActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name=".PaymentStatusReceiver"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.uugudev.rahaboss.PAYMENTSTATUSRECEIVER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.fortumo.android.FortumoActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<service android:name="com.fortumo.android.FortumoService" />
<activity
android:name=".Soundboard"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name=".FortumoMaksa"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.uugudev.rahaboss.FORTUMOMAKSA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
So basically I'm trying to start the Soundboard.Osteti(); in the Soundboard.java that adds 32000 to the counter int and then updates the TextView. But nothing happens.
Hope somebody can help me. Thanks!
I'm still trying to make this work.
There is this thing I think you've wrong in your manifest:
PaymentStatusReceiver it's not an activity, and you only need to configure that as a receveiver (as you already had).

Categories