• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Sharing image on Whatsapp : Android

Hi I am trying to create a simple android code of sharing QR code image via Whatsapp.But even though QR code is being properly generated and image is being also stored in the emulator, the image share to Whatsapp(via Intent) doesnt happen and the application crashes in phone but works in emulator.Here below is my code snippet.

public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo)
{
super.onCreateContextMenu(menu, v, menuInfo);
// you can set menu header with title icon etc
menu.setHeaderTitle("Share It");
// add menu items
menu.add(0, v.getId(), 0, "Share on Whatsapp");
menu.add(0, v.getId(), 0, "Share on Email");


}
public Uri getImageUri(Context inContext, Bitmap inImage) {
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
inImage.compress(Bitmap.CompressFormat.JPEG, 100, bytes);
String path = MediaStore.Images.Media.insertImage(inContext.getContentResolver(), inImage, "Title", null);
return Uri.parse(path);
}

@override
public boolean onContextItemSelected(MenuItem item) {

if (item.getTitle() == "Share on Whatsapp")
{
Uri imageUri=getImageUri(getApplicationContext(),bitmap);
Toast.makeText(getApplicationContext(),imageUri.getPath().toString(),Toast.LENGTH_SHORT).show();
// Log.e("Check",imageUri.getPath().toString());
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
//shareIntent.putExtra(Intent.EXTRA_TEXT,title + "\n\nLink : " + link );
shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageUri.getPath()));
shareIntent.setType("image/*");
startActivity(Intent.createChooser(shareIntent, "Share image via:"));
//Uri imageUri = Uri.parse(pictureFile.getAbsolutePath());
/* Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
//Target whatsapp:
shareIntent.setPackage("com.whatsapp");
//Add text and then Image URI
// shareIntent.putExtra(Intent.EXTRA_TEXT, picture_text);
shareIntent.putExtra(Intent.EXTRA_STREAM,imageUri);
shareIntent.setType("image/jpeg");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);*/

try {
startActivity(shareIntent);
} catch (android.content.ActivityNotFoundException ex)
{

//Toast.makeText(getApplicationContext(),"Exception "+ex.getMessage().toString(),Toast.LENGTH_SHORT).show();
Log.e("Error",ex.getMessage().toString());
//Toast.makeText("Whatsapp not installed",Toast.LENGTH_SHORT).show();
//Toast.makeText("Whatsapp not installed", Toast.LENGTH_SHORT).show();
}
}
else if (item.getTitle() == "Share on Email")
{
;
}
return true;
}

Here is the crash report on phone

java.lang.NullPointerException: uriString
at android.net.Uri$StringUri.<init>(Uri.java:490)
at android.net.Uri$StringUri.<init>(Uri.java:480)
at android.net.Uri.parse(Uri.java:452)
at com.sudarshan.qrcodegenerator.MainActivity.getImageUri(MainActivity.java:109)
at com.sudarshan.qrcodegenerator.MainActivity.onContextItemSelected(MainActivity.java:117)
at android.app.Activity.onMenuItemSelected(Activity.java:3628)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:436)
at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:196)
at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at com.android.internal.policy.PhoneWindow$PhoneWindowMenuCallback.onMenuItemSelected(PhoneWindow.java:3750)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:776)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:923)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:913)
at com.android.internal.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
at android.widget.AdapterView.performItemClick(AdapterView.java:318)
at android.widget.AbsListView.performItemClick(AbsListView.java:1165)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3145)
at android.widget.AbsListView.onTouchUp(AbsListView.java:4077)
at android.widget.AbsListView.onTouchEvent(AbsListView.java:3831)
at android.widget.DropDownListView.onTouchEvent(DropDownListView.java:116)
at android.view.View.dispatchTouchEvent(View.java:12558)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3079)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2727)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3085)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2741)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3085)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2741)
at android.widget.PopupWindow$PopupDecorView.dispatchTouchEvent(PopupWindow.java:2407)
at android.view.View.dispatchPointerEvent(View.java:12804)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5428)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5219)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4730)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4783)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4749)

T-mobile Data breach and sim swapping scam

Huh? To swap sim cards doesn't a new card have to be inserted ?
yes....this is from the article:
Regardless whether you're a T-Mobile user, the exposure of account PINs is a major danger. That's the password that you're asked to give to a T-Mobile employee before any changes can be made to your account. A scammer who knows your account password can call customer care and ask to have the SIM card linked to your phone number changed to a new SIM card and device, effectively taking over your phone number.

AUHB Global, Exynos update

This YouTube video by Velian takes a run through of the AUHB release...


I must say that his AnTuTu and GeekBench benchmarks seem a little on the low side compared to the ones I have got... without putting my phone in the fridge first.

AnTuTu AUHB benchmark

5ApxSwcl.png


GeekBench AUHB benchmark

frvYxKwl.png


Been on AUHB for 10 days and it is both battery friendly and cooler as well as fast.

AUHB Global, Exynos update

This YouTube video by Velian takes a run through of the AUHB release...


I must say that his AnTuTu and GeekBench benchmarks seem a little on the low side compared to the ones I have got... without putting my phone in the fridge first.

AnTuTu AUHB benchmark

5ApxSwcl.png


GeekBench AUHB benchmark

frvYxKwl.png


Been on AUHB for 10 days and it is both battery friendly and cooler as well as fast.

AUHB Global, Exynos update

This YouTube video by Velian takes a run through of the AUHB release...


I must say that his AnTuTu and GeekBench benchmarks seem a little on the low side compared to the ones I have got... without putting my phone in the fridge first.

AnTuTu AUHB benchmark

5ApxSwcl.png


GeekBench AUHB benchmark

frvYxKwl.png


Been on AUHB for 10 days and it is both battery friendly and cooler as well as fast.

Mouse and Keyboard Control API

I have a technical question about a challenge that someone may be able to help me with.

The issue is:
I have an Android remote control app that currently can only transmit the image of the mobile device to the controlling Windows client.

I am looking for the ability to remotely control the Android device with a mouse and keyboard as well.

I have heard that this only works with special API's released by the respective device manufacturer.

Can anyone confirm this and if so, how do we get these API's (code)?

Thanks
McByte

My phone is not showing all the wifi networks

That's an important detail, if this phone was taken apart previously for a repair there could any number of issues that causing problems. Did you do this yourself or was it done by a service center? If elsewhere, take it back to have them look things over. There's a good chance something to do with their reassembly caused this issue, but you'll need to sit down and examine the timeline of events and don't be surprised if you have to prove there's a cause and effect issue, not just a coincidental failure of some part.
Did you try doing a Network Settings Reset though? At least minimize the chance of a software issue so you can focus on this being a hardware issue.

Every reboot starts with "Android is upgrading"

Hi, here's an update. Three weeks ago I uninstalled a couple dozen apps, and inactivated another couple dozen apps. All I have left are three drawing apps, and a handful of others (Uber, ASTRO, etc.). My battery life is really good now (although that's probably just due to the new battery). Most important of all, performance is really good now (no more sluggish behavior). Initially after doing this, the "Android is upgrading" message continued to appear whenever I did a reboot. But it only lasted a couple minutes so I figured that was good enough.

But then, in the past couple days I suddenly noticed that the "Android is upgrading" message no longer occurs! And reboot time is shockingly fast (by my standards, for this device), like I don't know, maybe 5 seconds or something. So that is really nice.

It is mysterious how the problem took care of itself, or at least not as an immediate consequence of the actions that I took. I am certain of this because I kept track of these changes in writing. I only use this device every few days so it's hard to know when the change occurred.

Galaxy s10 front screen replacement

From your description this sounds like you've peeled apart the front screen itself -- typically there's the outer glass, bonded with the digitizer (the foil), bonded with the LCD (the 'display' aspect to the Display).
https://www.ifixit.com/Store/Android/Galaxy-S10-Screen/IF416-001?o=3
Also by your description it sounds like backtracking at this point is going to be problem if you started from the front to tear down this phone instead of the proper way starting from the back:
https://www.ifixit.com/Guide/Samsung+Galaxy+S10++Screen+Replacement/136889
If that is the case, coming from the front there's a chance. H vital connections (ribbon cables and such) between the Display assembly and the logic board weren't cleanly separated. How far down did you disassemble things? If it's just a matter where the Display assembly is ripped apart than you can still just go about tearing the phone down starting from the back. The Display assembly will have to be replaced as a unit anyway.

Samsung 200 megapixel camera sensor?

What I'd like to know is how big the sensor is, because the area of the sensor is more important than the number of pixels. Samsung are strangely coy about that, but since the area of an individual pixel is 0.64* the area of the 0.8um pixels of the S21 Ultra's main camera and the pixel count is 1.85* larger the overall sensor area should be about 18% larger than the S21 Ultra's sensor. Which is positive, but probably sounds less attention-getting than the megapixel count itself (which I don't take too seriously since nobody in their right mind will want to use the full unbinned 200MP resolution with this sensor),

Missing calls

I cannot prove it but it may be due to carriers implementing various tools to prevent the scam calls. My carrier is VZW and recently they pushed out their Call Filter app to try to intercept such calls. I did download the update and have noticed an uptick in the number of times I see a call was received (in notifications) but phone never rang nor beeped.
Since this is something that I have no control over, I just call back the contact who called me; hoping that call connects. Alas, it is the ever escalating battle between the carriers and the scammer/spammer contingent.
BTW, I never buy extended car warranty, even on a new car purchase.

Network Operators is not an Option

I wanted to add to this answer.....LG;'s support went above and beyond for me. They verified with Boost that my phone was indeed unlocked, and they believed that when I did a network reset the phone should just find the new tower (because of the new SIM) and auto-connect.

I did a hard reset for this phone, but as it booted up, I was always seeing a Virgin Mobile Screen...which bothered me. I knew that VM had ordered these phones spec'ed from LG with 'Network Operators' functionality removed...and I found also the ability to edit 'APN' points was turned off on this phone.

The thing that was stopping me during the steps to change service was always 'authentication error' when I tried to update my 'User Profile'. When the phone booted, I always saw 'Service Disabled' instead of a connection to a tower...so I knew that the update Profile Step was occurring through my home wireless...so my inability to 'authenticate' had to be related to my wifi. I removed the password security on my home wifi router. BAM...the update profile worked. Now I rebooted my phone and there was no longer any Virgin Mobile splash screen...just LG.

But I still saw 'No Service' instead of 'Service Disabled'. I thought I must need to edit the 'APN' settings too, in order to connect to a new network, but since that was grayed out...I decided I needed a new phone. But then...as I was sitting there...the cell phone rang. I got a junk call...but I dialed my home service, and bingo I was on my new network. The new network seemed to be intermittent in connecting from my house, but in the next few days it improved....not sure if this will be a long term problem due to an inferior carrier...they did recommend moving to 5G.

So... for anyone else with an LG7777 phone...Virgin Mobile made these phones purposefully restricted in terms of access to an open phone, but that is how the phone was spec'ed. Do a hard reset, use your new sim, and if you see 'authentication error..try again later' on your System Update functions, it is telling you there is an issue with your Wifi..not your tower.

Filter

Back
Top Bottom