Click here to Skip to main content
15,175,960 members

Comments by Rahul Ramakrishnan (Top 49 by date)

Rahul Ramakrishnan 9-May-20 2:51am View
   
The REST api that gets the questions has parameter named questionTypeID that specifies which type of input needs to be created.
questionTypesID 1 - Spinner
questionTypesID 2 - Multi Select Spinner
questionTypesID 5 - EditText

So first i retrieve the question list and as per the questionTypeID appropriate widgets need to be created
Rahul Ramakrishnan 2-Apr-20 12:12pm View
   
it is publicly accessible
Rahul Ramakrishnan 2-Apr-20 11:57am View
   
In house
Rahul Ramakrishnan 2-Apr-20 11:28am View
   
The web-service is working fine in Postman and chrome too. Its also working in my emulator and locally in my android device.
Rahul Ramakrishnan 25-Jul-17 0:11am View
   
Yes it was intentional. Did know what to put in the "What have I tried section" while posting the question
Rahul Ramakrishnan 29-Dec-15 22:31pm View
   
i'll give it a try
Rahul Ramakrishnan 22-Dec-15 2:59am View
   
this is the function that triggers the scanning function
scanFirstLabel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
IntentIntegrator integrator = new IntentIntegrator(Parent1Scan.this);
integrator.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);
integrator.setPrompt("Scan a barcode or QR Code");
integrator.setCameraId(0); // Use a specific camera of the device
integrator.setBeepEnabled(false);
integrator.setBarcodeImageEnabled(true);
integrator.addExtra(FIRST, 1);
integrator.initiateScan();
//setResult(RESULT_OK, integrator.createScanIntent());
}
});
i am getting the scan result in the variable 'scanedValue' but the value is not being displayed
Rahul Ramakrishnan 21-Dec-15 22:34pm View
   
i have two buttons and two input feilds, where on button click it opens up the built-in scanner. now with the code i have. when scan a code on clicking the first button, the result is populated in both the input feilds. what i want to achieve is when i click on the first scanning button the result must be populated in the first input feild
Rahul Ramakrishnan 17-Nov-15 4:56am View
   
can you please suggest how to do it
Rahul Ramakrishnan 27-Oct-15 4:51am View
   
chooseRetailer = (Spinner) getActivity().findViewById(R.id.spinner6); was declared when json data is populated .

when i declared it in onResume method it work fine
Rahul Ramakrishnan 27-Oct-15 4:41am View
   
yes is all declared. i am debugging the code line by line
Rahul Ramakrishnan 27-Oct-15 4:35am View
   
i get null pointer exception when i put use choodeRetailer.setVisibility(View.INVISIBLE);
chooseRetailer is the 2nd spinner
Rahul Ramakrishnan 27-Oct-15 4:23am View
   
Deleted
logAs.setAdapter(dataAdapter);
Rahul Ramakrishnan 8-Oct-15 5:28am View
   
thanks you very much.. it works fine but what if i have lots of java class that has to be implemented in the same way. will the result be consistent across all the class?
Rahul Ramakrishnan 8-Oct-15 3:32am View
   
So how do i make it work? i am totally new to this
Rahul Ramakrishnan 8-Oct-15 3:00am View
   
to get the new url i just passed it like this
final GlobalClass gb = new GlobalClass();
userEnteredMethod = gb.getNewURL();
Rahul Ramakrishnan 3-Oct-15 5:24am View
   
thanks a lot
Rahul Ramakrishnan 9-Sep-15 7:18am View
   
i did try it out but no effect.still same result
Rahul Ramakrishnan 21-Jul-15 3:18am View
   
figured it out.
a = Integer.parseInt(tv.getText().toString());
temp =a;
for(int i=1;i<=a;i++)
{
String sScan = et.getText().toString();
if (sScan.length() == 55 && sScan.contains("(01)") && sScan.contains("10") && sScan.contains("17") && sScan.contains("21"))
{
Toast.makeText(getApplicationContext(), "good", Toast.LENGTH_LONG).show();
temp=temp-1;
String val = Integer.toString(temp);
tv.setText(val);
et.setText("");
}
}
Rahul Ramakrishnan 14-Jul-15 2:45am View
   
i modified my code little bit but now i am getting the value as ACTUAL
this is the modified code

protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK && requestCode == PICK_IMAGE)
{
Uri imageUri = data.getData();
imageView.setImageURI(imageUri);
}
if (resultCode == RESULT_OK) {

Uri selectedImageUri = data.getData();
File f = new File("" + selectedImageUri);
//String s = getRealPathFromURI(selectedImageUri);
String s=f.getName();
//f.getName();

TextView tv= (TextView) findViewById(R.id.textView);
tv.setText(s);
Rahul Ramakrishnan 13-Jul-15 3:24am View
   
no. i cant exactly figure out where the mistake is happening. logcat does not show any errors
Rahul Ramakrishnan 10-Jul-15 0:13am View
   
in onPostCreate() this code mDrawerToggle.syncState(); this is where i get null pointer exception. when i comment that line the app runs but the navigation drawer does not show any items
Rahul Ramakrishnan 3-Jul-15 0:48am View
   
i need to check if the length is 40 , and it should contain (01) and (21)
is there any other way to acheive it?
Rahul Ramakrishnan 2-Jul-15 0:01am View
   
this is the value i need to split.
(01)18904037412920(17)160200(10)405595(21)HPNC000000019
when i type in (01)18904037412920(17)160200(10)405595(21 and when i click ) i get unfortunately stopped error
Rahul Ramakrishnan 2-Jul-15 0:01am View
   
this is the value i need to split.
(01)18904037412920(17)160200(10)405595(21)HPNC000000019
when i type in (01)18904037412920(17)160200(10)405595(21 and when i click ) i get unfortunately stopped error
Rahul Ramakrishnan 17-Jun-15 23:28pm View
   
so createFile just cerates a file with the same name. thanks for the clarification
Rahul Ramakrishnan 15-Jun-15 9:36am View
   
thanks for the reply. but the result is same. it doesn't show the icon
Rahul Ramakrishnan 15-Jun-15 5:26am View
   
ohh i figured it out.
num1.setText(Integer.toString(a));
Rahul Ramakrishnan 14-Jun-15 6:26am View
   
in browser
Rahul Ramakrishnan 6-Jun-15 1:02am View
   
i am getting lots of errors
Rahul Ramakrishnan 5-Jun-15 0:42am View
   
got it done...thanks for your valuable comments
Rahul Ramakrishnan 1-Jun-15 7:51am View
   
will this work?
Intent intent = new Intent(ACTION_SCAN);

intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
intent.putExtra("SCAN_MODE", "PRODUCT_MODE");
startActivityForResult(intent, 0);
Rahul Ramakrishnan 28-May-15 1:18am View
   
ohhh i'm sorry.. i was working on few assignments and i got totally confused. what i want is to display a pdf in a panel when the button is clicked. when i click the button it show open windows explorer, from there after choosing a pdf it should be displayed in the panel.
Rahul Ramakrishnan 27-May-15 4:16am View
   
i get no errors..
the problem is that i want to get all the editText values into the message
Rahul Ramakrishnan 27-May-15 2:17am View
   
i tried it..its not working
Rahul Ramakrishnan 25-May-15 23:53pm View
   
i refered to the link but did not solve my problem
Rahul Ramakrishnan 25-May-15 6:05am View
   
Deleted
code for manifest.xml

<uses-sdk android:minsdkversion="14" android:targetsdkversion="22">

<uses-permission android:name="android.permission.INTERNET">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">

<application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity android:name=".Login" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN">

<category android:name="android.intent.category.LAUNCHER">



mainactivity.java code(not complete code)

public class Login extends Activity {

EditText username,password;
Button blogin,bregister;
ProgressDialog prgDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
username=(EditText) findViewById(R.id.username);
password=(EditText) findViewById(R.id.password);
blogin=(Button) findViewById(R.id.signin);
blogin.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {

login(v);
}




});
bregister=(Button)findViewById(R.id.register);
bregister.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
Intent profile=new Intent(getApplicationContext(),Profile.class);
startActivity(profile);
}
});
Rahul Ramakrishnan 25-May-15 6:04am View
   
Deleted
ManifestFile.xml


<manifest xmlns:android="http://schemas.android.com/apk/res/android"
="" package="com.example.paperboy" android:versioncode="1" android:versionname="1.0">

<uses-sdk
android:minsdkversion="14"
="" android:targetsdkversion="22">

<uses-permission android:name="android.permission.INTERNET">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">

<application
android:allowbackup="true"
="" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme">
<activity
android:name=".Login"
="" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN">

<category android:name="android.intent.category.LAUNCHER">



Code for an Activity( not complete code)
public class Login extends Activity {

EditText username,password;
Button blogin,bregister;
ProgressDialog prgDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
username=(EditText) findViewById(R.id.username);
password=(EditText) findViewById(R.id.password);
blogin=(Button) findViewById(R.id.signin);
blogin.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {

login(v);
}




});
bregister=(Button)findViewById(R.id.register);
bregister.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
Intent profile=new Intent(getApplicationContext(),Profile.class);
startActivity(profile);
}
});
Rahul Ramakrishnan 20-May-15 3:53am View
   
>unable to add window token for an application
>Secondary onClick
>android.view.WindowManagerImpl.addView
Rahul Ramakrishnan 20-May-15 3:51am View
   
Deleted
>unable to add window token for an application
>Secondary onClick
>android.view.WindowManagerImpl.addView
Rahul Ramakrishnan 20-May-15 3:49am View
   
unable to add window token null for an application
Rahul Ramakrishnan 19-May-15 9:45am View
   
so if i change scan_result will i get the next value?
Rahul Ramakrishnan 19-May-15 9:04am View
   
i can't figure out exactly where it wrong. could you please guide me through it
Rahul Ramakrishnan 19-May-15 8:40am View
   
in the 1st editText in need to get a GIT number, in the second expiry number, in the third batch number and 4th serial number. but after scanning i get GIT number in all editText
Rahul Ramakrishnan 19-May-15 8:18am View
   
yes
Rahul Ramakrishnan 19-May-15 1:34am View
   
i used 4 edittext here but all four shows the same value. i need GTIN,expiry batch and a serial in each edittext

public void onActivityResult(int requestCode, int resultCode, Intent intent) {

if (requestCode == 0) {

if (resultCode == RESULT_OK) {

//get the extras that are returned from the intent

String contents = intent.getStringExtra("SCAN_RESULT");
String contents1 = intent.getStringExtra("SCAN_RESULT");
String contents2 = intent.getStringExtra("SCAN_RESULT");
String contents3 = intent.getStringExtra("SCAN_RESULT");
gtin.setText(contents.toString());
expiry.setText(contents1.toString());
batch.setText(contents2.toString());
serial.setText(contents3.toString());
Rahul Ramakrishnan 31-Mar-15 1:21am View
   
i am getting response from json but the listview is empty
Rahul Ramakrishnan 27-Mar-15 0:43am View
   
i need to get user input and compare it with json data. if the name is same toast name exists.
the exception that i get is Error Occured[server json response might be invalid]!
Rahul Ramakrishnan 23-Mar-15 7:59am View
   
java null pointer exception
handler.dispatch message