Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,780,683 Members 51,007 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
nikwen
Old
#11  
nikwen's Avatar
Recognized Contributor
Thanks Meter 1,308
Posts: 2,700
Join Date: Feb 2013
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: [ Click to Expand ]
 
MaartenXDA
Old
#12  
MaartenXDA's Avatar
Senior Member - OP
Thanks Meter 1,119
Posts: 1,881
Join Date: Oct 2012
Location: Amsterdam

 
DONATE TO ME
Quote:
Originally Posted by nikwen View Post
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: [ Click to Expand ]
 
xpirt
Old
#13  
xpirt's Avatar
Recognized Contributor
Thanks Meter 2,500
Posts: 2,432
Join Date: Feb 2013
Location: 69 6e 20 6d 79 20 68 6f 75 73 65

 
DONATE TO ME
Good job Maarten! So this is your method..! xD
Keep it up!

xpirt
 
Sandy||Striker
Old
#14  
Sandy||Striker's Avatar
Senior Member
Thanks Meter 25
Posts: 101
Join Date: Aug 2011
Location: faridabad

 
DONATE TO ME
Default 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.
 
nikwen
Old
#15  
nikwen's Avatar
Recognized Contributor
Thanks Meter 1,308
Posts: 2,700
Join Date: Feb 2013
Quote:
Originally Posted by Sandy||Striker View Post
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.
 
Sandy||Striker
Old
#16  
Sandy||Striker's Avatar
Senior Member
Thanks Meter 25
Posts: 101
Join Date: Aug 2011
Location: faridabad

 
DONATE TO ME
Quote:
Originally Posted by nikwen View Post
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
 
nikwen
Old
#17  
nikwen's Avatar
Recognized Contributor
Thanks Meter 1,308
Posts: 2,700
Join Date: Feb 2013
Quote:
Originally Posted by Sandy||Striker View 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
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.
 
Sandy||Striker
Old
(Last edited by Sandy||Striker; 3rd June 2013 at 07:48 AM.)
#18  
Sandy||Striker's Avatar
Senior Member
Thanks Meter 25
Posts: 101
Join Date: Aug 2011
Location: faridabad

 
DONATE TO ME
@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)
 
nikwen
Old
#19  
nikwen's Avatar
Recognized Contributor
Thanks Meter 1,308
Posts: 2,700
Join Date: Feb 2013
Quote:
Originally Posted by Sandy||Striker View Post
@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?
 
Sandy||Striker
Old
#20  
Sandy||Striker's Avatar
Senior Member
Thanks Meter 25
Posts: 101
Join Date: Aug 2011
Location: faridabad

 
DONATE TO ME
Quote:
Originally Posted by nikwen View Post
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes