May 19, 2017 09:50
Got to go.. happy coding
May 19, 2017 09:49
You have lot of tutorials on that online, please search.
May 19, 2017 09:48
yes
May 19, 2017 09:46
When you click on the notification, you want to open an Activity right? Use the name of the Activity there
May 19, 2017 09:45
Ya, replace the WebViewActivity, with your class name
May 19, 2017 09:44
for the Intent errors, import android.content.Intent;
May 19, 2017 09:44
so i think you can remove the code in if/else and write your own code there
May 19, 2017 09:43
there are related to my logic, the launchURL basically will have the url that you need to show
May 19, 2017 09:43
can you paste your screenshot with new errors?
May 19, 2017 09:42
let me know if that solves it
May 19, 2017 09:41
ya
May 19, 2017 09:40
no, those are the only two imports.. import com.onesignal.OSNotificationOpenResult;
import com.onesignal.OneSignal;
May 19, 2017 09:38
Ya its the same version, but can you change it to 3.+ and see, just for testing
May 19, 2017 09:37
can you paste the dependencies section from your gradle file in app module
May 19, 2017 09:35
are you using this in your build.gradle? compile 'com.onesignal:OneSignal:3.+@aar'
May 19, 2017 09:33
Ok, let me paste my code here for you.. with imports and other stuff
May 19, 2017 09:31
Ya also do the import I said in the above comment..
May 19, 2017 09:31
The OSNotificationOpenResult is part of OneSignal class. See if you can import OneSignal.OSNotificationOpenResult
May 19, 2017 09:31
I added the code in Application class on create method
 

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
Jan 28, 2015 12:46
@ErumHannan
Jan 28, 2015 12:46
I guess you can try that part for yourself.. glad you got the scanning part done. I got to go.. Happy Coding
Jan 28, 2015 12:45
may be you can send the bitmap that you have in "bitmap" object through intent. Never tried it before
Jan 28, 2015 12:44
ok..
Jan 28, 2015 12:43
what is it that you are sending in intent for barcode? i mean, intent.putExtra("barcode","????")‌​;
Jan 28, 2015 12:43
oh ok
Jan 28, 2015 12:42
i think, the line intent.putExtra("com.google.zxing.client.android.SCAN.SCAN_MODE","QR_CODE_MODE")‌​‌​; should be replaced with intent.putExtra("barcode","QR_CODE_MODE")‌​;
Jan 28, 2015 12:41
so you mean to say, you were able to show QR Code in the next activity, but you can't show Barcode? am i getting it right?
Jan 28, 2015 12:39
ok
Jan 28, 2015 12:38
I am not sure if mode is the reason for not scanning Barcode. I tested it when i did the app and it worked even for barcodes.
Jan 28, 2015 12:33
@ErumHannan
Jan 28, 2015 12:33
if you want to generate the QR code, only if the Contact has ph. no., make sure the Contact's phone number is not null and only then call the intent to encode
Jan 28, 2015 12:32
You can change that, by customising it to your requirement
Jan 28, 2015 12:32
ok now i get it. If you get even one non-null value, i.e., either name, phone, etc., it will generate the QR Code.
Jan 28, 2015 12:30
i didn't understand
Jan 28, 2015 12:25
@ErumHannan, check if email is null and if it is null, dont add to bundle. Even that is handled in the code i sent you.
Jan 28, 2015 11:47
private static String massageContactData(String data) {
// For now -- make sure we don't put newlines in shared contact data. It
// messes up
// any known encoding of contact data. Replace with space.
if (data.indexOf('\n') >= 0) {
data = data.replace("\n", " ");
}
if (data.indexOf('\r') >= 0) {
data = data.replace("\r", " ");
}
return data;
}
Jan 28, 2015 11:47
its a method to remove spaces and lines..
Jan 28, 2015 11:42
@ErumHannan, I think this line will get you address. methodsCursor
.getString(methodsCursor
.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS));
Jan 28, 2015 11:40
@ErumHannan, For Address - You have in the code. Check the lines above the line bundle.getString(ContactsContract.Intents.Insert.POSTAL); I think for COMPANY you have do similar.. Its been a while since i did it. I don't remember it now
Jan 28, 2015 11:29
take your time.. no prob
Jan 28, 2015 11:29
and after adding all the details of contact to bundle.. send the bundle in place of imageUri
Jan 28, 2015 11:28
okie.. the code i sent you yesterday has way to get all the details of contact and add to bundle.. please check the code carefully
Jan 28, 2015 11:27
r u trying to generate QR code for the contact's Image?
Jan 28, 2015 11:25
you are sending a Uri instead of bundle
Jan 28, 2015 11:25
@ErumHannan, I think you have to add the imageUri to a bundle object and send that, like this, for ex., Bundle bundle = new Bundle();
if (name != null && !name.isEmpty()) {
bundle.putString(ContactsContract.Intents.Insert.NAME,
massageContactData(name));
}
Jan 28, 2015 11:21
looking into it
Jan 28, 2015 11:17
@ErumHannan, Hi.. any luck with your QR?
Jan 27, 2015 13:09
add this to the encode activity
Jan 27, 2015 13:09
<intent-filter>
<action android:name="com.xxx.xx.android.ENCODE" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Jan 27, 2015 13:08
ok.. let me check