Post Reply

[GUIDE] Working with Parse | Push notifications | Users | Saving data | More

1st June 2013, 03:37 PM   |  #11  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,349
 
2,729 posts
Join Date:Joined: Feb 2013
More
Ok. Just saw that you get 1,000,000 messages for free.
That is great for small apps but if you go beyond that, it will be very expensive. However, I cannot compare it to the price of a server.

Any experiences?
The Following User Says Thank You to nikwen For This Useful Post: [ View ]
1st June 2013, 03:44 PM   |  #12  
MaartenXDA's Avatar
OP Senior Member
Flag Amsterdam
Thanks Meter: 1,120
 
1,881 posts
Join Date:Joined: Oct 2012
Donate to Me
More
Quote:
Originally Posted by nikwen

Ok. Just saw that you get 1,000,000 messages for free.
That is great for small apps but if you go beyond that, it will be very expensive. However, I cannot compare it to the price of a server.

Any experiences?

Yeah, well, the internet keeps getting more and more expensive. I don't like it either, but my app isn't that big so I can live with it


ParseData section updated!
The Following User Says Thank You to MaartenXDA For This Useful Post: [ View ]
2nd June 2013, 06:44 PM   |  #13  
Recognized Contributor
Thanks Meter: 2,588
 
2,498 posts
Join Date:Joined: Feb 2013
Donate to Me
More
Good job Maarten! So this is your method..! xD
Keep it up!

xpirt
3rd June 2013, 07:28 AM   |  #14  
Sandy||Striker's Avatar
Senior Member
Flag faridabad
Thanks Meter: 25
 
101 posts
Join Date:Joined: Aug 2011
Donate to Me
More
help needed
Code:
public void onClick(View arg0) {
		// TODO Auto-generated method stub
		switch (arg0.getId()){
		case R.id.bgo2:
			
			try{
				
				username=et1.getText().toString();
				password=et2.getText().toString();
			ParseUser signup = new ParseUser();
			signup.setUsername(username);
			signup.setPassword(password);
			signup.signUpInBackground(new SignUpCallback() {
			  public void done(ParseException e) {
			    if (e == null) {
			      // Hooray! Let them use the app now.
			    	Intent i = new Intent(MainActivity.this,Slider.class);
					startActivity(i);
			    } else {
			      // Sign up didn't succeed. Look at the ParseException
			      // to figure out what went wrong
			    	Toast.makeText(MainActivity.this, "something wrong" , Toast.LENGTH_SHORT).show();
			    }
			  }
			});
			} catch (IllegalArgumentException IO) {
				// The user didn't type in anything, I suggest using a Toast to notify him
				Toast.makeText(MainActivity.this, "Please type something" , Toast.LENGTH_SHORT).show();
				}
this is my code for signup on click of a button. everything is setup. but nothing happens when i click on sighn up button. and when i click on sigh in.. the app exits with an error. logcat says:-

Code:
06-03 11:55:41.761: E/SpannableStringBuilder(15340): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 11:55:41.761: E/SpannableStringBuilder(15340): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 11:55:42.178: E/NativeCrypto(15340): ssl=0x52f7c578 cert_verify_callback x509_store_ctx=0x52112a80 arg=0x0
06-03 11:55:42.178: E/NativeCrypto(15340): ssl=0x52f7c578 cert_verify_callback calling verifyCertificateChain authMethod=RSA
06-03 11:55:50.001: E/AndroidRuntime(15340): FATAL EXCEPTION: main
06-03 11:55:50.001: E/AndroidRuntime(15340): java.lang.IllegalArgumentException: Must specify a username for the user to log in with
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.parse.ParseUser.logInAsync(ParseUser.java:655)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.parse.ParseUser.logInInBackground(ParseUser.java:715)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.sandy.letsfixthat.MainActivity.onClick(MainActivity.java:98)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.view.View.performClick(View.java:4091)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.view.View$PerformClick.run(View.java:17072)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.os.Handler.handleCallback(Handler.java:615)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.os.Handler.dispatchMessage(Handler.java:92)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.os.Looper.loop(Looper.java:153)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.app.ActivityThread.main(ActivityThread.java:5086)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at dalvik.system.NativeStart.main(Native Method)
06-03 11:55:56.435: E/Trace(15377): error opening trace file: No such file or directory (2)
06-03 11:55:56.452: E/com.parse.PushService(15377): The Parse push service cannot start because Parse.initialize has not yet been called. 
													If you call Parse.initialize from an Activity's onCreate, that call should instead be in the Application.onCreate. 
													Be sure your Application class is registered in your AndroidManifest.xml with the android:name property of your <application> tag.
push notification working fine for me.
3rd June 2013, 07:34 AM   |  #15  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,349
 
2,729 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by Sandy||Striker

Code:
public void onClick(View arg0) {
		// TODO Auto-generated method stub
		switch (arg0.getId()){
		case R.id.bgo2:
			
			try{
				
				username=et1.getText().toString();
				password=et2.getText().toString();
			ParseUser signup = new ParseUser();
			signup.setUsername(username);
			signup.setPassword(password);
			signup.signUpInBackground(new SignUpCallback() {
			  public void done(ParseException e) {
			    if (e == null) {
			      // Hooray! Let them use the app now.
			    	Intent i = new Intent(MainActivity.this,Slider.class);
					startActivity(i);
			    } else {
			      // Sign up didn't succeed. Look at the ParseException
			      // to figure out what went wrong
			    	Toast.makeText(MainActivity.this, "something wrong" , Toast.LENGTH_SHORT).show();
			    }
			  }
			});
			} catch (IllegalArgumentException IO) {
				// The user didn't type in anything, I suggest using a Toast to notify him
				Toast.makeText(MainActivity.this, "Please type something" , Toast.LENGTH_SHORT).show();
				}
this is my code for signup on click of a button. everything is setup. but nothing happens when i click on sighn up button. and when i click on sigh in.. the app exits with an error. logcat says:-

Code:
06-03 11:55:41.761: E/SpannableStringBuilder(15340): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 11:55:41.761: E/SpannableStringBuilder(15340): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 11:55:42.178: E/NativeCrypto(15340): ssl=0x52f7c578 cert_verify_callback x509_store_ctx=0x52112a80 arg=0x0
06-03 11:55:42.178: E/NativeCrypto(15340): ssl=0x52f7c578 cert_verify_callback calling verifyCertificateChain authMethod=RSA
06-03 11:55:50.001: E/AndroidRuntime(15340): FATAL EXCEPTION: main
06-03 11:55:50.001: E/AndroidRuntime(15340): java.lang.IllegalArgumentException: Must specify a username for the user to log in with
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.parse.ParseUser.logInAsync(ParseUser.java:655)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.parse.ParseUser.logInInBackground(ParseUser.java:715)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.sandy.letsfixthat.MainActivity.onClick(MainActivity.java:98)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.view.View.performClick(View.java:4091)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.view.View$PerformClick.run(View.java:17072)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.os.Handler.handleCallback(Handler.java:615)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.os.Handler.dispatchMessage(Handler.java:92)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.os.Looper.loop(Looper.java:153)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at android.app.ActivityThread.main(ActivityThread.java:5086)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
06-03 11:55:50.001: E/AndroidRuntime(15340): 	at dalvik.system.NativeStart.main(Native Method)
06-03 11:55:56.435: E/Trace(15377): error opening trace file: No such file or directory (2)
06-03 11:55:56.452: E/com.parse.PushService(15377): The Parse push service cannot start because Parse.initialize has not yet been called. 
													If you call Parse.initialize from an Activity's onCreate, that call should instead be in the Application.onCreate. 
													Be sure your Application class is registered in your AndroidManifest.xml with the android:name property of your <application> tag.
push notification working fine for me.

I think that the EditText for the username is empty.

Quote from second post:

Quote:

But, if the user didn't type in anything, signin up throws a IllegalArgumentException.

3rd June 2013, 07:37 AM   |  #16  
Sandy||Striker's Avatar
Senior Member
Flag faridabad
Thanks Meter: 25
 
101 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Quote:
Originally Posted by nikwen

I think that the EditText for the username is empty.

Quote from second post:

no its not empty.. i tried with a few entries.. it is not signing up users??
the above code is for signing the new users
3rd June 2013, 07:40 AM   |  #17  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,349
 
2,729 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by Sandy||Striker

no its not empty.. i tried with a few entries.. it is not signing up users??
the above code is for signing the new users

Just checked the logs again. They contain instructions to get it working:

Quote:

The Parse push service cannot start because Parse.initialize has not yet been called.
If you call Parse.initialize from an Activity's onCreate, that call should instead be in the Application.onCreate.
Be sure your Application class is registered in your AndroidManifest.xml with the android:name property of your <application> tag.

3rd June 2013, 07:46 AM   |  #18  
Sandy||Striker's Avatar
Senior Member
Flag faridabad
Thanks Meter: 25
 
101 posts
Join Date:Joined: Aug 2011
Donate to Me
More
@nikwen
this is the error now
i am getting this on clicking signup button
Code:
06-03 12:12:51.893: E/SpannableStringBuilder(22529): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 12:12:51.893: E/SpannableStringBuilder(22529): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 12:12:59.150: E/AndroidRuntime(22529): FATAL EXCEPTION: main
06-03 12:12:59.150: E/AndroidRuntime(22529): java.lang.NullPointerException
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at com.sandy.letsfixthat.MainActivity.onClick(MainActivity.java:55)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.view.View.performClick(View.java:4091)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.view.View$PerformClick.run(View.java:17072)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.os.Handler.handleCallback(Handler.java:615)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.os.Handler.dispatchMessage(Handler.java:92)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.os.Looper.loop(Looper.java:153)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.app.ActivityThread.main(ActivityThread.java:5086)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at dalvik.system.NativeStart.main(Native Method)
Last edited by Sandy||Striker; 3rd June 2013 at 07:48 AM.
3rd June 2013, 08:05 AM   |  #19  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,349
 
2,729 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by Sandy||Striker

@nikwen
this is the error now
i am getting this on clicking signup button

Code:
06-03 12:12:51.893: E/SpannableStringBuilder(22529): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 12:12:51.893: E/SpannableStringBuilder(22529): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
06-03 12:12:59.150: E/AndroidRuntime(22529): FATAL EXCEPTION: main
06-03 12:12:59.150: E/AndroidRuntime(22529): java.lang.NullPointerException
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at com.sandy.letsfixthat.MainActivity.onClick(MainActivity.java:55)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.view.View.performClick(View.java:4091)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.view.View$PerformClick.run(View.java:17072)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.os.Handler.handleCallback(Handler.java:615)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.os.Handler.dispatchMessage(Handler.java:92)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.os.Looper.loop(Looper.java:153)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at android.app.ActivityThread.main(ActivityThread.java:5086)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at java.lang.reflect.Method.invokeNative(Native Method)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at java.lang.reflect.Method.invoke(Method.java:511)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
06-03 12:12:59.150: E/AndroidRuntime(22529): 	at dalvik.system.NativeStart.main(Native Method)

The error is in line 55 in MainActivity.java.

Could you please highlight this line?
3rd June 2013, 08:28 AM   |  #20  
Sandy||Striker's Avatar
Senior Member
Flag faridabad
Thanks Meter: 25
 
101 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Quote:
Originally Posted by nikwen

The error is in line 55 in MainActivity.java.

Could you please highlight this line?



Code:
		password=et2.getText().toString();


---------- Post added at 12:58 PM ---------- Previous post was at 12:45 PM ----------

got the error.. thanks for your help

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Java for Android App Development by ThreadRank