B4A Library AndroidProviders (Calendars, Contacts, Calls Log, Telephony, SMS, MMS and more

jefflynn1974

Member
Licensed User
Longtime User
Hello!

How can I get the call logs? The class name is the same and when i use the CallsProvider I don't have .getcalls
 

DonManfred

Expert
Licensed User
Longtime User
I guess it must be different.
My guess was right. I used two time the same classname to wrap.

Library V1.1 updated in Post #1

Attached an Example to read the CallLog
 

Attachments

  • CallsEx.zip
    7.7 KB · Views: 271

swamisantosh

Member
Licensed User
Longtime User
with Library libAndroidProvidersV1.0.0 the sample code works fine,
but when i updated Library to libAndroidProvidersV1.1.0 i getting the error message
Line 30 : cp.Initialize("")

error message

B4A version: 5.80
Parsing code. (0.01s)
Compiling code. Error
Error compiling program.
Error description: Object reference not set to an instance of an object.
Occurred on line: 30
cp.Initialize("")
Word: (
please guide me
 

u2005k

Member
Licensed User
Longtime User
Hi Don,

When I try to use TelephonyProvider and Carriers I get following error.

Dim tp As TelephonyProvider
tp.Initialize

Dim c As Cursor
c = tp.Carriers
Error occurred on line: 95 (Main)
java.lang.SecurityException: No permission to write APN settings
at android.os.Parcel.readException(Parcel.java:1620)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
at android.content.ContentResolver.query(ContentResolver.java:493)
at android.content.ContentResolver.query(ContentResolver.java:435)
at com.github.providers.core.AbstractProvider.getContentTableData(AbstractProvider.java:29)
at com.github.providers.android.telephony.TelephonyProvider.getCarriers(TelephonyProvider.java:108)
at de.donmanfred.TelephonyProviderWrapper.getCarriers(TelephonyProviderWrapper.java:112)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:708)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)


Are there additional permissions required?

Thanks & regards...


 

GaryK4

Member
Licensed User
Longtime User
I am trying to run this example. I installed the libraries.
When I run the program, it gives me an error on the Initialize
contp.Initialize("")

Error description: Object reference not set to an instance of an object.
Error occurred on line: 37
contp.Initialize("")
Word: (

Did I forget something
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…